I have the idea to create the program but I need help in finishing it. My task is to write a program that prints out a chessboard using only asterisks. I have to use multiple nested loops with nested conditional statements inside. The output should look like a chessboard as follows: The pattern is not coming out as I want but I guess y'all know what a chessboard look like
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
int main()
{
for (int rowloop = 0; rowloop < 4; rowloop++)
{
for (int row = 0; row < 3; row++)
{
for (int column = 0; column < 5; column++)
cout << "*";
cout << endl;
}
cout << endl << endl;
}
return 0;
}
I want to have a variable for the box that way when I set up the row and column if it is odd it starts doing the pattern from the first location and if not it indent in like the second row in the example and print the pattern. I appreciate any help that I can get.