#include<iostream>
using namespace std;
int main()
{
int yangHui[10][10];
int row,column;
for(row=0;row<10;row++)
{
for(column=0;column<=row;column++)
{
if(column==0||column==row)
yangHui[row][column]=1;
else
yangHui[row][column]=yangHui[row-1][column-1]+yangHui[row-1][column];
}
}
cout<<" 杨辉三角形的前十行是:"<<endl;
for(row=0;row<10;row++)
{
for(column=0;column<=row;column++)
{
cout<<" "<<yangHui[row][column];
}
cout<<endl;
}
return 0;
}