#include <iostream>
#include <conio.h>

using namespace std;

int main() {     
	const int max=10;                           // liczba kolumn i wierszy
	for (int i=0;i<=max;i++) {
  	  for (int j=0;j<=max;j++) {
		if (i*j==0) {
			if ((i==0)&&(j==0)) cout<<"  * | ";
			else {
			  if ((i==0)&&(j<10)) cout<<"  "<<j<<" ";
			  if ((i==0)&&(j>=10)) cout<<" "<<j<<" ";
			  if ((j==0)&&(i<10)) cout<<"  "<<i<<" | ";
			  if ((j==0)&&(i>=10)) cout<<" "<<i<<" | ";
			}
		}
		else if (i*j<10) cout<<"  "<<i*j<<" ";
		else if (i*j<100) cout<<" "<<i*j<<" ";
		else cout<<i*j<<" ";	
	  }
	  cout<<"\n";
	  if (i==0) {
		cout<<"----+";
		for (int j=1;j<=max;j++) 
			cout<<"----";
	  cout<<"\n";
	  }
	}
  	getch();
	return 0;
}
