write a program in function
Attachments:
Answers
Answered by
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
Economy,
6 months ago
English,
6 months ago
World Languages,
1 year ago
Math,
1 year ago
Geography,
1 year ago
Physics,
1 year ago
World Languages,
1 year ago