public class yanghui
{
public static void main(String args[])
{
int[][] nyanghui=new int[10][];
for(int i=0;i<nyanghui.length;i++)
{
for(int j=0;j<i;j++)
{
if(j==0 || j==i)
nyanghui[i][j]=1;
else
nyanghui[i][j]=nyanghui[i-1][j-1]+nyanghui[i-1][j];
}
}
for(int i=0;i<nyanghui.length;i++)
{
for(int j=0;j<nyanghui[i].length;j++)
{
System.out.println(nyanghui[i][j]);
}
}
}
}
谢了.