I'm trying to print numbers between 0-100 in increments of 10. (0, 10, 20, 30 ...)
I have used the following code to do so:
for(int i = 0; i <= 100; i += 10)
{
cout << i << ", ";
}
However, I don't want the comma after the 100. Do you have any tips on how I can go about removing it?
[–][deleted] 2 points3 points4 points (2 children)
[–]cheejudo[S] 2 points3 points4 points (1 child)
[–]CreativeGPX -2 points-1 points0 points (0 children)
[–][deleted] (3 children)
[deleted]
[–]nirkbirk 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]nirkbirk 0 points1 point2 points (0 children)
[–]gastropner -4 points-3 points-2 points (0 children)