While Loops
3 / 5
Nested while loops
Input an integer n
. Print a multiplication table for numbers 1 to n
.
Each row should represent the multiples of a number from 1 to n
.
For example, if n
is 3, the output should be:
1 2 3
2 4 6
3 6 9
Each number should be separated by a space, and each row should end with a newline.