0

[SOLVED] How do i get the following output using for loop in c++?

1 1 2 1 2 3 1 2 3 4 1 2 3 4 5

19th Nov 2017, 10:14 AM
Ajinkya
Ajinkya - avatar
3 Antworten
+ 10
I can give you a hint on how it is done. Use nested loops. An outer loop to count to five and an inner loop to print out each number. Remembering to end the line before the outer loop starts again.
19th Nov 2017, 11:11 AM
jay
jay - avatar
+ 2
Thanks for helping. I could get the output without further help. Here is the link https://code.sololearn.com/cEgoi1mk9yY7/?ref=app
20th Nov 2017, 4:14 AM
Ajinkya
Ajinkya - avatar