Question: Please, need help with this assigment in C programing language In put 1. a) Ask for n. Check for bounds (1

Please, need help with this assigment in C programing language

In put 1.

a) Ask for n. Check for bounds (1 <= n && n <= 10).

b) If the user entered an integer within (1 and 10), move on to getting the value for k

c) Else keep asking the user till they give a correct value which is an integer within 1 and 10.

d) Reject any input greater than 10 or less than 1 by displaying an error message and then asking the user to re-enter the input. Do this as many times that they enter incorrect input.

2) In put 2.

a) Ask for k. Check for bounds (1 <= k && k <= n).

i) If the user entered an integer within (1 and n), move on to next step.

ii) Else keep asking the user till they give a correct value which is an integer within 1 and n.

iii) Reject any input greater than n or less than 1 by displaying an error message and then asking the user to re-enter the input. Do this as many times that they enter incorrect input.

3) Calculate n k.

4) Calculate factorial of n, k and n k.

5) Calculate the Combination by plugging in factorial of n / (factorial of k * factorial of n - k)

6) Output

a) Print 5, the number of combinations of n things taken k at a time. This is the output of your program.

Assume that all of the internal calculations can be done using integers, i.e. don't worry about integer overflow.

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!