very basic c++ syntax question

I am working my way through the tutorials on this site and have a question pertaining to this example:
#include <iostream>
using namespace std;

int main ()
{
int n;
cout << "Enter the starting number > ";
cin >> n;

while (n>0) {
cout << n << ", ";
--n;
}


cout << "FIRE!\n";
return 0;
}

my question has to do with the line reading: cout << n << ", ",;
I'm not sure what the ( ", ",;) means.
can anyone lend an answer real quick?
thank you in advance for your help
John
You seem to have added a comma in there.

That just prints a string containing a comma and a space after the number. For example if n = 5, it would print output: "5, ". When n is decremented it will do the same for 4.

"5, 4, 3, 2, 1, FIRE!
"
Last edited on
Topic archived. No new replies allowed.