num = int(input("Enter number: "))
sum = 0
temp = num
while temp > 0:
digit = temp % 10
sum += digit ** 3
temp //= 10
if num == sum:
print(num,"is an Armstrong number")
else:
print(num,"is not an Armstrong number")
num = int(input("Enter number: "))
sum = 0
temp = num
while temp > 0:
digit = temp % 10
sum += digit ** 3
temp //= 10
if num == sum:
print(num,"is an Armstrong number")
else:
print(num,"is not an Armstrong number")
n = int(input("Enter number: "))
a = 0
b = 1
c = 1
if n==0 or n==1:
print("Yes. {} is a fibonnaci number".format(n))
else:
while a<n:
a=c+b
c=b
b=a
if a==n:
print("Yes. {} is a fibonnaci number".format(n))
else:
print("No. {} is NOT a fibonacci number".format(n))
n = int(input("Enter number: "))
a = 0
b = 1
c = 1
if n==0 or n==1:
print("Yes. {} is a fibonnaci number".format(n))
else:
while a<n:
a=c+b
c=b
b=a
if a==n:
print("Yes. {} is a fibonnaci number".format(n))
else:
print("No. {} is NOT a fibonacci number".format(n))