// Micheal H. McCabe
// Checkerboard Square Program
//
// Based on the program presented on pages 81 - 85 in the textbook.
//
// Special Assignment -- February 4, 2009
// CS-130 Programming and Problem Solving with C++

#include <iostream>
#include <string>

using namespace std;

int main()
{
	char space = ' ';    // A blank space
	char star = '*';     // The asterisk
	char hash = '#';     // To be pendantic, it's called an octothorpe
	char current = '=';  // Holds the "current character"

	int board_rows = 8;
	int board_columns = 8;
	int box_width=8;
	int box_height=8;
	int char_row = 0;
	int char_column = 0;
        int blockx = 0;
        int blocky = 0;

	for ( char_row=0; char_row <= (board_rows*box_height); char_row++)
		{
		for (char_column=0; char_column <= (board_columns*box_width); char_column++)
		{
			blockx=char_column/box_width; // integer math is always lovely.
			blocky=char_row/box_height;

			if ((blockx % 2) == 0)
				if ((blocky % 2) == 0)
					current = hash;
				else current = space;

			if ((blockx % 2) != 0)
				if ((blocky % 2) != 0)
					current = hash;
				else current = space; 		
		cout << current;
			}
		cout << endl;

		}

	return 0;
}
