Question: I understand this code except for the part where it needs to end the program if the number is not in the range after printing

I understand this code except for the part where it needs to end the program if the number is not in the range after printing the error message.  I understand this code except for the part where it needs

marks People Window Help Assignments-2181,23417 xy D Problem, set-2(4).pdf uffalo.edu/bbcswebdav/pid-44968 23-dt-content-rid-18 1426903/courses/2181-234 17/Problem-Set.2%28 Q3) Using the recursive factorial function from Lecture 5, write a program that calculates "n choose r" Firstly, prompt the user to enter two long long unsigned int numbers, n and r. Do this by printing the string, "Setting combination paraneters, select n and r: ". To scanf a long long unsigned int use %11u", use the sanne alu" for printing. The factorial function must be adjusted to return a long long unsigned int as well as accept a long long unsigned int as an argument. The program must make sure that n is NOT greater than 20, and that r is less than n. If either of those conditions are not met (n greater than 20 or r greater than n), print the string "Error: n is greater than 20 or r is greater than n.|n", and end the program (do NOT ask the user for a new input). Follow the equation: The combination calculation should be inside a function with the prototye: long long unsigned int combination(long long unsigned int a, long long unsigned int r The program should print the answer. A sample output is shown below: Setting combination parameters, select n and r: 10 2 45 or Setting combination parameters, select n and T: 12 6 924 or Setting combination parameters, select n and r: 24 12 Error: n is greater than 20 or r is greater than n Note: There are still NO double spaces. Name your file combinations.c

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!