← Back to Loops
Question 387
Multiplication Table Row
Multiplication Table Row
Read a number n and print its times table from 1 to 10 with a while loop, one line per product in the form n x i = product (for instance the third line for 7 is 7 x 3 = 21). Input: one integer, no prompt. Expected Output shows all ten lines.
Expected Output:
7 x 1 = 7 7 x 2 = 14 7 x 3 = 21 7 x 4 = 28 7 x 5 = 35 7 x 6 = 42 7 x 7 = 49 7 x 8 = 56 7 x 9 = 63 7 x 10 = 70
= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
Loops
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.