diff --git a/Python/armstrong_num.py b/Python/armstrong_num.py new file mode 100644 index 0000000..c8ab56a --- /dev/null +++ b/Python/armstrong_num.py @@ -0,0 +1,11 @@ +num = int(input('enter the nuber')) +s = 0 +temp = num +while temp > 0: +c = temp % 10 +s += c**3 +temp //= 10 +if s == num: +print('armstrong number') +else: +print('not an armstrong number')