From 52d606575c491fddcbc7b5cf4f4aa80455eb450a Mon Sep 17 00:00:00 2001 From: kanishkasrivastava Date: Thu, 21 Oct 2021 16:36:05 +0000 Subject: [PATCH] added pythonprogram to find armstrong number --- armstrongnumberkanishka.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 armstrongnumberkanishka.py diff --git a/armstrongnumberkanishka.py b/armstrongnumberkanishka.py new file mode 100644 index 0000000..68cf731 --- /dev/null +++ b/armstrongnumberkanishka.py @@ -0,0 +1,18 @@ +#// Author :RUDRANSH SRIVASTAVA +import math +num=int(input("eneter your number :")) +n=num +rev=0 +while n>0: + + d=n % 10 + + rev=rev + pow(d,3) + + n=int(n/10) + +if rev==num: + print("{} is angstrom number".format(num)) + +else: + print("{} is not angstrom number".format(num))