Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

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
 
PREVIOUS NEXT
Tagged: #python #multiply #digits #number
ADD COMMENT
Topic
Name
2+7 =