# include # include using namespace std; int main ( ) { int i; int j; cout << "\n"; cout << "Here are the locations on a chessboard:\n"; cout << "\n"; for ( i = 1; i <= 8; i++ ) { for ( j = 1; j <= 8; j++ ) { cout << " (" << i << "," << j << ")"; } cout << "\n"; } cout << "\n"; cout << "Here are the locations on a checkerboard:\n"; cout << "\n"; for ( i = 1; i <= 8; i++ ) { for ( j = 1; j <= 8; j++ ) { if ( ( i + j ) % 2 == 0 ) { cout << " (" << i << "," << j << ")"; } else { cout << " "; } } cout << "\n"; } return 0; }