Last active
June 5, 2022 15:35
-
-
Save PushkraJ99/42c272b680305fddfdbf178cedba014c to your computer and use it in GitHub Desktop.
Armstrong Number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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