➽ Program:-
num = int(input("Enter a Number:
"))
sum = 0
temp = num
while(temp > 0):
digit = temp % 10
sum += digit ** 3
temp //= 10
if(sum == num):
print(num, "is
an Armstrong No")
else:
print(num, "is
not an Armstrong No")
➽ Output:-
Enter a Number: 371
371 is an Armstrong No
Enter a Number: 1600
1600 is not an Armstrong No
0 Comments
Please do not enter any spam link in the comment section.