// Draw a matrix of numbers
// Date 20:49 08/12/2016
// By Ben a.k.a DreamVB

#include <iostream>
#include <time.h>

using namespace std;
using std::cout;
using std::endl;

int main(int argc, char *argv[]){
	int rows = 8;
	int cols = 8;
	int r = 0;

	char *aRow = "+----+----+----+----+----+----+----+----+";

	int matrix[8][8] = {};

	srand(time(0));

	for (int i = 0; i < rows; i++){
		for (int j = 0; j < cols; j++){
			matrix[i][j] = rand() % 80;
		}
	}

	for (int i = 0; i < rows; i++){
		std::cout << aRow << endl;
		for (int j = 0; j < rows; j++){
			std::cout << "| ";
			if (matrix[i][j] < 10) std::cout << " " << matrix[i][j] << " ";
			if (matrix[i][j] >= 10) std::cout << matrix[i][j] << " ";
		}
		cout << "|" << endl;;
	}
	//Add end line
	std::cout << aRow << endl;

	system("pause");
	return EXIT_SUCCESS;
}