I'm trying to write a program that reads 2 positive integers (m and n), and then print the n first positive integers of m using only while loop.
Here is the original question
Write a program in the Python 3.x language that reads two positive integers, m and n, and print the first n positive integers that are multiples of m.
And the output of the code should look like:
Type a positive integer for m: 9
Type a positive integer for n: 5
The first 5 positive integers multiples of 9 are:
9
18
27
36
45
So I have done so far:
m = int(input("Type a integer for m: "))
n = int(input("Type a integer for n: "))
i = 1
print()
print("The first ",n,"positive integers multiples of ", m," are:")
while i <= n:
m = m * i
print(m)
i = i + 1
I wanna understand how to fix this one and I realize that using for or if it's gonna be easier to do that