杨辉三角
public class yanghui {
public static void main(String args[]){
int[][] a;
a=new int [5][5];
int i,j;
for(i=0;i<5;i++){
for(j=0;j<=i;j++){
if(j==0||j==i)
a[i][j]=1;
else
a[i][j]=a[i-1][j-1]+a[i-1][j];
System.out.print(a[i][j]+"") ;}
System.out.print("\n");
}
}
}