Table of multiplication of size n x n
Solved
Hugo7700
Posted messages
9
Status
Member
-
flopython78 -
flopython78 -
Hello everyone,
I have an exercise to do but I really don’t know how to do it. That’s why I need your help today :)
Here is the statement:
Write code that reads a strictly positive integer n and displays on n lines a multiplication table of size n x n, with, for i from 1 to n, the first n positive multiples of i on the i-th line.
Thus, the first line shows the first n strictly positive multiples of 1 (0 not included), the second line shows the first n multiples of 2, and so on.
I know I need to use the for loop, but I have a problem with the display, and with the "line breaks" to make. Thanks in advance for your help!
I have an exercise to do but I really don’t know how to do it. That’s why I need your help today :)
Here is the statement:
Write code that reads a strictly positive integer n and displays on n lines a multiplication table of size n x n, with, for i from 1 to n, the first n positive multiples of i on the i-th line.
Thus, the first line shows the first n strictly positive multiples of 1 (0 not included), the second line shows the first n multiples of 2, and so on.
I know I need to use the for loop, but I have a problem with the display, and with the "line breaks" to make. Thanks in advance for your help!
2 answers
-
Hello,
CCM does not do the exercises. Help can be provided if personal work is demonstrated.
--
People who fight may lose. People who do not fight have already lost.
(Bertolt BRECHT)