public class yanghuisanjiao {
public static void main(String[] args) {
// TODO Auto-generated method stub
int N=10,i,j;
int a[][]=new int [N][];
for(i=0;i<N;i++)
{
a[i]=new int[i+1];
a[i][0]=1;
a[i][i]=1;
}
for(i=2;i<N;++i)
{
for(j=1;j<i;++j)
{
a[i][j]=a[i-1][j-1]+a[i-1][j];
}
}
for(i=0;i<N;++i)
{
for(j=0;j<=i;++j)
{
System.out.print(a[i][j]+"\t");
}
System.out.println();
}
}
}