Python program to find the product of two numbers using recursive

0
7
def mult_product(x,y):
    if(x<y):
        return mult_product(y,x)
    elif(y!=0):
        return(x+mult_product(x,y-1))
    else:
        return 0
#_____main_____
num1=int(input("Please enter first number: "))
num2=int(input("Please enter second number: "))
print("Product is: ",mult_product(num1,num2))

    Output 1:
            Please enter first number: 10
            Please enter second number: 80
            Product is:  800
    Output 2:
            Please enter first number: 15
            Please enter second number: 25
            Product is:  375
    Output 3:
            Please enter first number: 12
            Please enter second number: 20
            Product is:  240

इन्हें भी देखें।

Python Programs के लिये यहाँ click करें।

 

 

 

 

 

Python program to find the product of two numbers using recursive Python program to find the product of two numbers using recursion write a program to find the product of two numbers using recursive in python write a python program to find the product of two numbers using recursive write a program to find the product of two numbers using recursion in python write a python program to find the product of two numbers using recursion python program to find product of two numbers using recursion python program to find product of 2 numbers using recursion product of two numbers using recursion in python product of two numbers using recursive in python find the product of two numbers find the product of two numbers in python find the product of two numbers using recursive find the product of two numbers using recursion in python find the product of two numbers using recursion

LEAVE A REPLY

Please enter your comment!
Please enter your name here