Question: You should create the following functions in java to ultimately display specified rows of Pascal's triangle: int factorial(int n); int nChooseR(int n, int r) string
You should create the following functions in java to ultimately display specified rows of Pascal's triangle: int factorial(int n); int nChooseR(int n, int r) string displayPascal(int row) Your factorial() routine must implement recursion. In your main() routine, call displayPascal(5), displayPascal(8), and displayPascal(11) to display the 5th, 8th, and 11th rows of Pascal's triangle, respectively. So your output should only be 3 lines. Try to make your code as compact as possible (while maintaining readability). Avoid unnecessary lines of code that don't help to accomplish the goal.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
