Here you need to print the first 10 multiples of any number using a while loop.
You should get the number as an input from the user.
For example: if the user enters 2 then the first 10 multiples of 2 are 2,4,6, 8, 10, 12, 14, 16, 18 and 20. in python
Answers
Program:
number, i = int(input("Enter a number - ")), 1
print(f"First 10 multiples of %d - " % number, end = "")
while (i < 11):
print(number * i, end = " ")
i += 1
Answer:
The correct using while loop syntax.
Explanation:
#Accept a Number and print its first 10 multiples
n= int(input(“Enter a Number: “))
for i in range (1, 11):
x=n*i
Print(x)
Output:
Enter a Number: 2
4
6
8
10
12
14
16
18
20
The Above syntax is about finding multiples of 10 numbers using while loop.
While loop is a syntax that iterates the while condition if it is true.
#SPJ2