标签:[] == main string for ati ring out print
public class YH {
public static void main (String args[]){
int a[][]=new int[5][5];
int i,j ;
for(i=0;i<5;i++){
for(j=0;j<5;j++){
a[i][0]=1;
if(i==j)
a[i][j]=1;
}
}
for(i=0;i<5;i++)
for(j=1;j<i;j++)
a[i][j]=a[i-1][j-1]+a[i-1][j];
for(i=0;i<5;i++){
for(j=0;j<5;j++)
System.out.print(a[i][j]+" ");
System.out.println();
}
}
}
标签:[] == main string for ati ring out print
原文地址:http://www.cnblogs.com/b983766/p/6629446.html