Write a program to accept a number and check and display whether it's a spy number or not.
Answers
Answered by
12
Answer:
Explanation:
Hope it helps friend!
Attachments:
Answered by
1
Answer:
Using python:
______________________
def spy(n):
b=str(n)
sum=0
pro=1
for i in range(0,len(b)):
sum+=int(b[i])
pro*=int(b[i])
if sum==pro:
return ("Yes it's a spy number")
else:
return ("No, it's not a spy number")
_________________________________
Attachments:
Similar questions