The Question is Write a program that output the numbers 0 to 8 in three columns, where the width of each of them 3. The output should be as follows:
0 1 2
3 4 5
6 7 8
so what i've done so far is :
#include<iostream.h>
void main()
{
int x;
for (x=0;x<=8;x++)
cout<<x<<"t"<<x++<<"t"<<x++<<"n"<<endl;
}
my problem is that my output is the oppisite like the following :
2 1 0
5 4 3
8 7 6
can someone tell me what i'm doing wrong ??
or can you give me a hint ?