for(int i = num-1; i>=0; i--)
{
cout << "reverse: " << array[i] << ", " << endl;
}
I was wondering how do I print an array on a single line? That is, the above code gives me the numbers in a list fashion like this:
reverse: 3,
reverse: 2,
reverse: 4,
where as I just want it as:
reverse: 3,2,4
Thanks a lot in advance!!

New Topic/Question
Reply




MultiQuote






|