Given a number and find the product of its digits as output . For example if the given number is 432 then output is 24 and another example if the given number is 110 then output is 0 and another example if the given number is 02 then the output is 2
number = int(input("number: "))
prod = 1
for n in str(number):
prod *= int(n)
print(prod)
Comments
Leave a comment