Computer Science, asked by sultaniakaushal, 1 year ago

Write a program to print all armstrong numbers from 1 to 100

Answers

Answered by Anonymous
1
hey mate here is your answer

This C Program print armstrong number from 1 to 1000. An Armstrong number is an n-digit base b number such that the sum of its (base b) digits raised to the power n is the number itself. Hence 153 because 13 + 53 + 33 = 1 + 125 + 27 = 153.


hope it help
mark as brainliest

Anonymous: thanks dude
Answered by Anonymous
2
import math
x=0
for i in range(1,101):
a=i
while a>=1:
b=a%10
x+=math.pow(b,3)
a=a//10
if x==a:
print(x)
else:
Continue

Secondly there is no Armstrong number between 1 and 100

Hope it helps you
^_^

Anonymous: please mark as brainleist
sultaniakaushal: Very nice
Similar questions