Skip to content

Latest commit

 

History

History

armstrong_number

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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