0
how to print last increment
i use increment in gcd program
2 Réponses
+ 2
You could also just use cout << i++; This way you are printing I, THEN incrementing it. for example.
int i = 2;
cout << i++ << endl;
cout << i << endl;
what is printed:
2
3
+ 1
I think what you want is this
cout<<++i;
but if not, be a little more specific