Hi All, I need your help in working out this problem. I want to print that desired output but i'm struggling with the logic.
[1000] [1001] [1002] [ * ] [1004] [1005]
[1006] [ * ] [1008] [1009][1010] [ * ]
[1012] [1011] [1014] [ * ] [1016] [1016]
[1018] [ * ] [1020] [1021][1022] [ * ]
[1024] [1025] [1026] [ * ] [1028] [1029]
[1030] [ * ] [1031] [1033][1034] [ * ]
This is what i have so far.
for(row= 0; row< 6; row++ )
{
cout<<" "<<endl;
for(column = 0; column < 6; column++)
{
table[row][column] = count;
cout<<"["<<table[row][column]<<"]";
count++;
}
}
Output:
[1000][1001][1002][1003][1004][1005]
[1006][1007][1008][1009][1010][1011]
[1012][1013][1014][1015][1016][1017]
[1018][1019][1020][1021][1022][1023]
[1024][1025][1026][1027][1028][1029]
[1030][1031][1032][1033][1034][1035]
I want to be able to manipulate every 4 index.
e.g. the first index is table[0][3] = *, then table[1][1]=*, then table[1][6]=* etc.
Would appreciate your support on this,
Thanks
What do you mean? Can you post your full code?