Answers for "python multiply digits of a number"

0

python multiply digits of a number

def getProduct(n):
 
    product = 1
 
    # Converting integer to string
    num = str(n)
     
    # Traversing the string
    for i in num:
        product = product * int(i)
 
    return product
Posted by: Guest on April-17-2021

Code answers related to "python multiply digits of a number"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language