Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Program to find armstrong number
  • Loading branch information
implosion07 authored Jan 3, 2022
1 parent 2e63603 commit 70f1710
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Armstrong_number.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#checking for armstrong number
a=input('Enter a number')
n=int(a)
S=0
while n>0:
d=n%10
S=S+d*d*d
n=n/10
if int(a)==S:
print("Armstrong Number")
else:
print("Not an Armstrong Number")

0 comments on commit 70f1710

Please sign in to comment.