How to check a number is Armstrong Number or not using Java program.

what is Armstrong Number ?

Armstrong number is a number that is equal to the sum of cubes of its digits. For example 0, 1, 153, 370, 371 and 407 are the Armstrong numbers.

Example case 370 :

33 + 73 + 03 = 370 ; so it is an Armstrong Number.

From my given code

Sample input :

370

Sample output :

370 is Armstrong number !

Sample input :

432

Sample output :

432 is not Armstrong number !

I hope this will help you <3