Question: C++ program, please comment it out as much as possible. Thank you 7. The expression C(n,r) denotes the number of r-element subsets of an n-element
C++ program, please comment it out as much as possible. Thank you

7. The expression C(n,r) denotes the number of r-element subsets of an n-element set. For example, C(4,2) is 6 because there are six 2-element subsets of a 4-element set. The value of C(n,r is given by the formula n)(n-F) Write a program that computes C(n, r using the following component functions (a) main: prompts the user for two numbers and accents them into n and r, respectively (b) check: compares r and n. If r> n, check invokes the function err msg, which prints an appropriate error message (c) comb: computes C(n, r) (d) fact: computes factorial. Expected Output Enter n in C(n,r) : 4 Enter r in C(n,r) : 7 n must be greater than or equal to r in C(n,r) Enter n in C(n,r) : 5 Enter r in C(n,r) : 2 10 (iii) Enter n in C(n,r): Enter r in C(n,r) : 20 53130 25 (iV) Enter n in C(n,r) : 5:2 Enter r in C(n,r) : 48 270725
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
