#include #include using namespace std; int main() { for (int row {0}; row < 8; ++row) { for (int col {0}; col < 8; ++col) { if ((row + col) % 2 == 0) { cout << "##"; //Arrive here if (row + col) even } else { cout << " "; //Arrive here if (row + col) odd } } cout << "\n"; //Each row ends with a newline. } return EXIT_SUCCESS; }