From 58596f127f73c09ef6f51d5093b489f4834e20de Mon Sep 17 00:00:00 2001 From: Gobind Anand <67106625+GobindAnand@users.noreply.github.com> Date: Wed, 20 Oct 2021 22:05:50 +0530 Subject: [PATCH] Program for Armstrong no. made in python --- Gobind1 | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Gobind1 diff --git a/Gobind1 b/Gobind1 new file mode 100644 index 0000000..e267001 --- /dev/null +++ b/Gobind1 @@ -0,0 +1,11 @@ +n = int(input("Enter a number: ")) +sum = 0 +temp = n +while temp > 0: + digit = temp % 10 + sum += digit ** 3 + temp //= 10 +if n == sum: + print(n,"is an Armstrong number") +else: + print(n,"is not an Armstrong number")