With the help of a loop, print the numbers in the following way.
one
6
2 2
7 7
3 3 3
8 8 8
4 4 4 4
9 9 9 9
With the help of a loop, print the numbers in the following way.
one
6
2 2
7 7
3 3 3
8 8 8
4 4 4 4
9 9 9 9
It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:
For example:
for (int x = 1; x <= 4; ++x) { for (int i = 0; i < x; ++i) { Console.Write(x + " "); } Console.WriteLine(); for (int i = 0; i < x; ++i) { Console.Write(x + 5 + " "); } Console.WriteLine(); } Or so:
for (int x = 1; x <= 4; ++x) { Console.WriteLine(string.Join(" ", new int[x].Select(v => x))); Console.WriteLine(string.Join(" ", new int[x].Select(v => x + 5))); } Source: https://ru.stackoverflow.com/questions/718977/
All Articles