I'm beginning to learn C++, and I need to write a program that prints n rows of digits. The nth row needs to read 1234...n. Also, if a row has more than 10 digits, the digit after 9 should start from 0. For example:
For numbers greater than 10, I need to use x%10 to compute x mod 10.
I'm not sure how to get the output horizontal rather than vertical. I also don't have a great grasp of loops within loops, which probably contributes to my problem. Can anyone help me out? Thanks