Write a program that lets the user input an integer n between 4 and 9, and output a triangle. Use a 2-dimensional array.
Sample input/output:
Please input an integer between 4 and 9: 6
Output:
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
The bold character is user input.
Note. For this triangle, in each line, the first and the last integer is 1. For the other elements, the value(v) is computed from the upper left element(l) and the upper element(u), v=l+u. If there is no upper element, then u is automatically 0. For example, the underlined 10 is computed by underlined 4 plus the underlined 6.