An armstrong number

mail@pastecode.io avatar
unknown
plain_text
a year ago
178 B
2
Indexable
Never
num=int(input("num="))
sum=0
a=num
while num!=0:
    digit=a%10
    a//=10
    sum += digit ** 3
    if num==sum:
        print("TRUE")
    else:
        print("FALSE")