← Back to Loops
Question 36
Multiplication Table of 4
Multiplication Table of 4
Use a for loop to print the multiplication table of 4, from 1 to 10. Print each line in the format '4 x i = result' with each line on its own row. Expected output: 4 x 1 = 4 4 x 2 = 8 ... 4 x 10 = 40
Expected Output:
4 x 1 = 4 4 x 2 = 8 4 x 3 = 12 4 x 4 = 16 4 x 5 = 20 4 x 6 = 24 4 x 7 = 28 4 x 8 = 32 4 x 9 = 36 4 x 10 = 40
= newline. No newline 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 · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.