Question: C++ Write a program that builds the PASCAL triangle of degree N and stores it in a square matrix P of dimension N+1. Example: Pascal's

C++
Write a program that builds the PASCAL triangle of degree N and stores it in a square matrix P of dimension N+1. Example: Pascal's triangle of degree 6: N = 0 1 N = 1 1 1 N = 2 1 2 1 N = 3 1 3 3 1 N = 4 1 4 6 4 1 N = 5 1 5 10 10 5 1 N = 6 1 6 15 20 15 6 1 Method: Calculate and display only the values up to the main diagonal (included). Limit the degree to enter by the user to 13. Construct the triangle line by line: 1. Initialize the first element and the element of the diagonal to 1. 2. Calculate the values between the initialized elements from left to right using the relation: Pij = Pi-1.j+P-1,3-1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
