Armstrong Number

Posted on December 28, 2014 by Edit

An Armstrong number is a number such that the sum of its digits raised to the third power is equal to the number itself.

For example, 371 is an Armstrong number, since 3^3 + 7^3 + 1^3 = 371.

Another example, 153. 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153.

Program to find whether the given number is an Armstrong number or not.

Code

loading...
loading...
loading...
Tags : cpythonjavascript
This website is made possible by displaying online advertisements to our visitors.
Please consider supporting by disabling your ad blocker.
loading comments...