java杨辉三角
public class Main {
public static void main(String[] args) {
int[][] doubleArr = new int[5][];
for (int i = 0; i < doubleArr.length; i++) {
doubleArr[i] = new int[i + 1];
for (int j = 0; j < doubleArr[i].length; j++) {
if (j == 0 || i == j) {
doubleArr[i][j] = 1;
} else {
doubleArr[i][j] = doubleArr[i - 1][j] + doubleArr[i - 1][j - 1];
}
}
}
}
}