Armstrong Number With Example : Java Program Source Code

If the sum of the cubes of the digit is equal to the number then the number is called as Armstrong number .
Armstrong number is also known as narcissistic number or a plus perfect number .

Read Also  :   Fibonacci series Recursion  program in java : Code with example

The name of the term is coined after  Michael F. Armstrong .

for e.g.

take a number 371
we need to check whether it is an armstrong number is or not .
Digits are 3,7,1
cubes of digit are

Sum of cubes of digit =27+343+1
which is equal to the number itself ,  hence  371 is a armstrong number

About The Author

Subham Mittal has worked in Oracle for 3 years .
For more java articles ,Click here to Subscribe JavaHungry