An Armstrong number is a number that is the sum of its digits each raised to the power of the number of digits. For example 0, 1, 153, 370, 371 and 407 are the Armstrong numbers.
Example:
Input:
153
Output:
Armstrong
Explanation:
153 = (1*1*1)+(5*5*5)+(3*3*3)
153 = 1 + 125 + 27
153 = 153
Thus, 153 is an Armstrong number
Input:
371
Output:
Armstrong
Explanation:
371 = (3*3*3)+(7*7*7)+(1*1*1)
371 = 27 + 343 + 1
371 = 371
Thus, 371 is an Armstrong number
Program:
Output: