+ 3
A challange for YOU :: WRITE A PROGRAM TO FIND ALL ARMSTRONG NO. BETWEEN 0 - 999 👍
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to thenumber itself. For example, 371 is anArmstrong number since 3**3 + 7**3 + 1**3 = 371. Write a program to find all Armstrong number in the range of 0 and 999.
4 ответов
+ 12
+ 10
Here's in one line... 😊
https://code.sololearn.com/cE8cxxv2d9mT/?ref=app
+ 6
#python.....
for i in range(1000):
a=str(i);c=sum(int(i)**3 for i in a)
if int(a)==c:
print(c)
0
Here's my quick code.
https://code.sololearn.com/cpCIRwW2mqWv/?ref=app