top of page

Python program to multiply two numbers by repeated addition

Writer's picture: Rajesh SinghRajesh Singh

Program:

a = int(input("Enter the first number: "))

b = int(input("Enter the second number: "))

product = 0

for i in range(b):

product= product+a

print(product)

Output:

Enter the first number: 3

Enter the second number: 4

12



935 views0 comments

Recent Posts

See All

Comments


bottom of page