Professional Documents
Culture Documents
Exp: Date
Exp: Date
DATE :
AIM
ALGORITHM
OUTPUT
PROGRAM
low = int(input("enter the lower bound :"))
high = int(input("enter the higher bound :"))
for n in range(low, high + 1):
# order of number
order = len(str(n))
# initialize sum
sum = 0
temp = n
while temp > 0:
digit = temp % 10
sum += digit ** order
temp //= 10
if n == sum:
print(n, end=" ")
RESULT