Computer Science, asked by riasingh321p, 1 year ago

write a program in function

Attachments:

Answers

Answered by Anonymous
0

public class Armstrong

{

public static void main(int n)

{

int a, num, s =0;

while (n>0)

{

a=n%10;

s=s+a*a*a;

n=n/10;

}

if(num==s)

System.out.println("1");

else

System.out.printpn("0");

}

}

Similar questions