#include <iostream>
#include<iomanip>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
int i,j;
cout<<' ';
for (i=1;i<10;i++)
cout<<setw(4)<<i;
cout<<endl;
for (i=1;i<10;i++){
cout<<i;
for(j=1;j<10;j++)
cout<<setw(4)<<(i*j);
cout<<endl;
}
return 0;
}