- #1
magnifik
- 360
- 0
i am wondering what is the best way to justify a block of text. for example, right now i have a code that prints: 1 2 3 4 5 6 7 8 9 10 11 and so on, but i want it to print
in other words, there is a new line at the end of the seventh number. this is the code:
thanks
1 2 3 4 5 6 7
10 11 12 13 14 15 16
10 11 12 13 14 15 16
in other words, there is a new line at the end of the seventh number. this is the code:
Code:
int i = 0;
while (i < 31){
cout << setw(4) << i;
i++;
}
thanks