Program to check whether a number is Armstrong or not.

Program Logic:

An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself.

For example, 371 is an Armstrong number since 3**3 + 7**3 + 1**3 = 371.
153 = 1*1*1 + 5*5*5 + 3*3*3

Or:

 

You may also like...