- Posted By: pradeeshtet
- Comments: 0
program to find whether the number is armstrong or not
simple java program to display armstrong number. What is armstrong number - In armstrong number sum of cubes of its digits is equal to the number itself.
Example 1: 153 - 1^3+5^ 3+ 3^ 3 =1+125+27= 153, therefore 153 is armstrong number.
Example 2: 125 - 1^ 3+2^ 3+5^ 3= 1+8+125=134, therefore 125 is not an armstrong number.
The code check the number given by user is amrstrong number or not .