The Program to check or find the armstrong-number using Java.



To check whether the number is armstrong number or not, Before writing the java program let's disscuss about what is the armstrong number ?

If the number is equal to the sum of cube of it's own digit then it is called Armstrong Number.

For example : Let's take a number n=407.

x = 4*4*4 ( cube of it's own place digit )
y = 0*0*0 ( cube of it's own place digit )
z = 7*7*7 ( cube of it's own place digit )

so, sum = x+y+z
sum = 64 + 0 + 343


sum = 407
The number n=407 is an Armstrong Number.



Program Code :