so here is what i'm working with.
#include <iostream>
using namespace std;
int main()
{
int i, h = -1;
for (i = 0; i < 8; i++) {
h = h + 1;
cout << h << endl;
} // while
return 0;
} // main
I need my output to look like
1 2 3 4 5 6 7
but I am getting
1
2
3
4
...
Is there anything besides endl
you can use to print to the same line with spaces? thanks and sorry for the noob question. i'm am slowly learning c++.