0
How to write python program to find the given number is an Armstrong number
2 Answers
0
https://www.programiz.com/JUMP_LINK__&&__python__&&__JUMP_LINK-programming/examples/armstrong-number
https://www.programiz.com/python-programming/examples/armstrong-interval
https://www.geeksforgeeks.org/python-program-to-check-armstrong-number/
https://www.thecrazyprogrammer.com/2017/05/python-program-check-armstrong-number.html
+ 1
num = int(input("enter a number: "))
length = len(str(num))
sum = 0
temp = num
while(temp != 0):
    sum = sum + ((temp % 10) ** length)
    temp = temp // 10Â
if sum == num:
    print("armstrong number")
else:
    print("not ")