Try this,
int main()
{
int column=16;
int row=8;
for (int counter = 0; counter < row; counter++){
if ( counter % 2 == 0 ) // if even row shift one space
cout << " ";
for (int count = 0; count < column; count++){
if ( count % 2 == 0)
cout << "*";
else
cout << " ";
}
cout << endl;
}
return 0;
}
|