// Multiplication table using a matrix
// By DreamVB 10:56 16/10/2016

#include <iostream>
#include <iomanip>
using namespace std;

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

void DrawLine(){
	int i = 0;
	//Draw a line
	while (i < 23){
		cout << setw(3) << "+++";
		i++;
	}
}

void main(){
	int i = 0;
	int j = 0;
	cout << "Multiplication Table" << endl;
	//Draw line
	DrawLine();
	//Print multiplication table
	for (i = 1; i <= 12; i++){
		cout << endl;
		cout << setw(3) << i << "   ";

		for (j = 2; j <= 12; j++){
			//Print out answers of multiplication i*j
			cout << setw(3) << (i*j) << "   ";
		}
	}
	//Draw line breaks and line
	cout << endl;
	DrawLine();
	cout << endl;

	system("pause");
}
