check whether a number is Armstrong number or not
Answers
Answered by
0
n=int(input("Enter any number: "))
a=n
arm=0
while n>0:
m=n%10
arm=arm+m*m*m
n=n//10
if a==arm:
print(a,"is an Armstrong number.")
else:
print(a,"is not an Armstrong number.")
Hope this helps you
Have a great day
Similar questions