#include <iostream>
#include <vector>

class Table
{
public:
	Table(int row, int col)
		: mRow(row), mCol(col)
	{
		mTable.resize(row, std::vector<int>(col, 0));
	}
	
	int Row() const { return mRow; }
	int Col() const { return mCol; }
	void SetEntry(int row, int col, int value) { mTable[row][col] = value; }
	int GetEntry(int row, int col) const { return mTable[row][col]; }
	
	void Print() const
	{
		for (auto &rowVector : mTable)
		{
			std::cout << "|";
			for (auto &entry : rowVector)
			{
				std::cout << " " << entry;
			}
			std::cout << " |\n";
		}
	}
	
private:
    int mRow;
    int mCol;
	std::vector<std::vector<int>> mTable;
};

void SetTableToRowColMultiplication(Table &table)
{
	for (auto row=0; row<table.Row(); ++row)
	{
		for (auto col=0; col<table.Col(); ++col)
		{
			table.SetEntry(row, col, (row+1)*(col+1));
		}
	}
}

int main()
{
	Table t(9, 9);
	t.Print();
	std::cout << "======\n";
	SetTableToRowColMultiplication(t);
	t.Print();
	return 0;
}