Skip to content

Instantly share code, notes, and snippets.

@PushkraJ99
Last active June 5, 2022 15:35
Show Gist options
  • Select an option

  • Save PushkraJ99/42c272b680305fddfdbf178cedba014c to your computer and use it in GitHub Desktop.

Select an option

Save PushkraJ99/42c272b680305fddfdbf178cedba014c to your computer and use it in GitHub Desktop.
Armstrong Number
#Armstrong Number using Python (Github:-PushkraJ99)
i=int(input("Enter Number to Check : "))
orig=i
sum=0
while(i>0):
sum=sum+(i%10)*(i%10)*(i%10)
i=i//10
if orig==sum:
print("This Number is Armstrong !!")
else:
print("This Number is Not Armstrong !!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment