Skip to content
Home » Program to Multiply Two Numbers Without using Operator in Python

Program to Multiply Two Numbers Without using Operator in Python

Learn about Program to Multiply Two Numbers Without using Operator in Python in the below code example. Also, refer to the comments in the code snippet to get a detailed view about what’s actually happening.

Program to Multiply Two Numbers Without using Operator in Python

The below program, multiply two numbers that are taken from the user. It doesn’t use any multiplication operator.

Source code:

# Program to Multiply Two Numbers Without using Operator

num1 = int(input('Enter first number: '))
num2 = int(input('Enter second number: '))

# calculate the product
product = 0
for i in range(1,num2+1):
    product=product+num1

# print the result
print("The Product of Numbers is:", product)

Output:

Enter first number: 3
Enter second number: 4
The Product of Numbers is: 12

Hope above code works for you and Refer the below Related Codes to gain more insights. Happy coding and come back again.

Similar Code : Product of Two Numbers in Python using Recursion