Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 416 Bytes

README.md

File metadata and controls

11 lines (7 loc) · 416 Bytes

Armstrong number

Given a number x, determine whether the given number is Armstrong number or not. A positive integer of n digits is called an Armstrong number of order n (order is number of digits) if :

abcd... = pow(a,n) + pow(b,n) + pow(c,n) + pow(d,n) + ....

Example:

Input : 1634
Output : The number is armstrong
14 + 64 + 34 + 44 = 1634