Python Armstrong Number Program | Check Armstrong Number Example

SOLUTION.

num = int(input("Enter the number :- ")) temp = num sum = 0 while temp >0: rem = temp % 10 sum = sum + (rem *rem *rem) temp = temp//10 if sum == num: print("Number is Armstrong......") else: print("Number is not Armstrong......")

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.