Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Probability, number of combinations (sometimes referred to as binomial coefficients) of n times taken r at a time is written as C(nr) conscious subset
In Probability, number of "combinations" (sometimes referred to as binomial coefficients) of n times taken r at a time is written as C(nr) conscious subset of r times taken from a set of n times- the permutations, it is written as P(n. r) = . Both cases, r n 1. n! r r!(n-r)! n! Create a seript that will prompt the user to type in values for n and r, then calculate C(n,r) and P(n,r). After the display of the result, the user should be prompted as well whether shehe wants to repeat the process or not. Requirements 1) The user should be prompted 2 times for n and r 2) Check whether S2. If this condition is not satisfied, warn the user to type in appropriate values for rand n, AGAIN 3) Create a user defined function that computes the Cn,rl. (This user defined function should take 2 arquments and return the numerical result of the Clo.r).) 4) Create a user defined function that computes the Pinal (This user defined function should take 2 arguments and return the numerical result of the Pn 5) Store result of Cn.dland Pin in an array 6) After the display of the result, the user should be prompted as well whether she he wants to repeat the process or not. 7) Once the user typed in her/his decision of "NOT REPEATING THE PROCESS", the stored values in the array should be displayed all together 8) For displaying the result array, you should use "dereferencing the pointer approach
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started