标签:string for else sys gen 杨辉三角 rate == eth
public class 杨辉三角 {
/**
* @param args
*/
public static void main(String[] args) {
int a[][],i,j;
for(i=0;i<=5;i++)
{
for(j=0;j<i;j++)
{
if(i==j||j==1) a[i][j]=1;
else
a[i][j]=a[i][j-1]+a[i-1][j-1];
System.out.print(a[i][j]);
}
System.out.print("\n");
}
}
}
// TODO Auto-generated method stub
标签:string for else sys gen 杨辉三角 rate == eth
原文地址:http://www.cnblogs.com/dx20152111104/p/6701730.html