write a program that displays the multiplication table of a number entered by user
Answers
Answer:
Enter the number: 10
Enter the number of which the user wants to print the multiplication table: 13
The Multiplication Table of: 13
13 x 1 = 13
13 x 2 = 26
13 x 3 = 39
13 x 4 = 52
13 x 5 = 65
13 x 6 = 78
13 x 7 = 91
13 x 8 = 104
13 x 9 = 117
13 x 10 = 130
Explanation:
In the above program, we have taken an input integer number from the user. Then we have iterated for loop using the range (1, 11) function, which means greater than or equal to 1 and less than 11. In the first iteration, the loop will iterate and multiply by 1 to the given number. In the second iteration, 2 is multiplied by the given number, and so on.
In this case, we have printed the table of 10. You can provide the different numbers to test the program.
Note:
Is this how you do it?