Skip to content

Commit

Permalink
Merge pull request #233 from akshatjain24/armstrong
Browse files Browse the repository at this point in the history
add armstrong code
  • Loading branch information
Punit-Choudhary authored Oct 30, 2022
2 parents 3571578 + 25ea2f2 commit 6e7bd4a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Math/Armstrong.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
x = input()
sum = 0
for i in x:
z = int(i)
sum += z**len(x)
if sum == int(x):
print('Armstrong Number')
else:
print('Not an Armstrong Number')

0 comments on commit 6e7bd4a

Please sign in to comment.