write a program in java to convert Armstrong number using do while and for loop
Answers
Answered by
2
Java program to check armstrong number. This Java program checks if a number is Armstrong or not. Armstrong number is a number which is equal to the sum of …
Answered by
0
Explanation:
public static void main(String[] arg) { int i=100,arm; System. out. println("Armstrong numbers between 100 to 999");
while(i<1000) { arm=armstrongOrNot(i); if(arm==i)
System. out. println(i); i++; } }
int x,a=0; while(num!=0) { x=num%10;
a=a+(x*x*x); num/=10 ; } return
Similar questions