#include"stdio.h"
#define N 10
int main()
{
int a[N][N] = { 0 }, m, n;
for (m = 0; m <= 9; m++)
{
for (n = 0; n <= m; n++)
{
a[m][0] = 1;
a[m][m] = 1;
if (m >= 2)
{
a[m][n] = a[m - 1][n - 1] + a[m - 1][n];
}
}
}
for (m = 0; m <= 9; m++)
{
for (n = 0; n <= m; n++)
{
printf("%d\t", a[m][n]);
}
printf("\n");
}
return 0;
}