import java.util.Scanner;
public class Eext {
public static void main(String[] args) {
//打印一个十行的杨辉三角
/*
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
*/
int[][] YangHui = new int[10][]; //确定了一位数组的个数
for (int i = 0; i < YangHui.length; i++) { //遍历一维数组
YangHui[i] = new int[i + 1]; //给一维数组分配空间
for (int j = 0; j < YangHui[i].length; j++) { //给每个一维数组赋值
if (j == 0 || j == YangHui[i].length -1 ) { //如果 j 是第一个数或最后一个数 输出 1
YangHui[i][j] = 1;
} else {
YangHui[i][j] = YangHui[i - 1][j] + YangHui[i - 1][j - 1]; //如果 j 是上一行相邻的两个数字之和 输出这行
}
}
}
for (int i = 0; i < YangHui.length; i++) { //输出YangHui三角
for (int j = 0; j < YangHui[i].length; j++) {
System.out.print(YangHui[i][j] + " ");
}
System.out.println();
}
}
}