public class Main {
	public static void main(String[] args) {
		int[][] nums = pascal(5);  // Array nums contains the first five rows of Pascal's Triangle

		printInts(nums);
	}

	private static int[][] pascal(int n) {
		int[][] pascal = new int[n][n];
		for (int row = 0; row < n; row++) {
			for (int col = 0; col <= row; col++) {
				if (col == 0 || col == row) {
					pascal[row][col] = 1;
				} else {
					pascal[row][col] = pascal[row-1][col-1] + pascal[row-1][col];
				}
			}
		}
		return pascal;
	}
}