Please provide a c++ programme Among other applications, Pascal’s triangle (see Figure 7.18) provides a means of determining the number of possible combinations of n things taken r at a time. For example, the number of possible combinations of five people (n = 5) taken two at a time (r = 2) is 10.
Please provide a c++ programme
Among other applications, Pascal’s triangle (see Figure 7.18) provides
a means of determining the number of possible combinations of n things taken r at a time. For example, the number of possible combinations of five people (n = 5) taken two at a time (r = 2) is 10.
Each row of the triangle begins and ends with 1. Every other element in a row is the sum of the element directly above it with the element to the left of the one above it. That is,
element[n][r] = element[n-1][r] + element[n-1][r-1]
Using this information, write and test a C++
thank you
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images