Good day to everyone.
I'm a newbie at C++ programming and I have a concern regarding the do-while loop code below. The output is:
10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0,
I need to remove the comma sign (,) after 0. Can someone lend a hand with this?
#include <iostream>
using namespace std;
int main()
{
int ctr = 10;
do {
cout << ctr <<", ";
ctr--;
}while (ctr>=0);
return 0;
}
Last edited on
Thanks, men I appreciate it.