标签:public nbsp 个数 [] void static system str main
public static void main(String[] args)
{
int i, j, n = 8, l, r;
int a[] = new int[9];
System.out.println(1);
for (i = 1; i <= n; i++)
{
l = 1;
System.out.print(1 + " ");
for (j = 1; j <= i; j++)
{
r = a[j];
a[j] = l + r; /* 每个数是上面两数之和 */
l = r;
System.out.print(a[j] + " ");
}
System.out.println();
}
}
标签:public nbsp 个数 [] void static system str main
原文地址:http://www.cnblogs.com/zx1376/p/6797222.html