Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 629 Bytes

File metadata and controls

28 lines (22 loc) · 629 Bytes

Armstrong Numbers

Challenge Description:

An Armstrong number is an n-digit number that is equal to the sum of the n'th powers of its digits. Determine if the input numbers are Armstrong numbers.

Input sample:

Your program should accept as its first argument a path to a filename. Each line in this file has a positive integer. E.g.

6
153
351

Output sample:

Print out True/False if the number is an Armstrong number or not. E.g.

True
True
False