Suppose we have time, and we want to form groups by choosing items from the ins. The number of different groups of items cach can be computed using the filming formula from the probability theory Cir) -P) where at is the factorial of Write a program to accept the values and where is a positive integer andrs, and compute the value Your main program should call function of integet type to compute the factorial values Sample of the main program is as below, + void main 1 long facts void read data tint intint vold Print_outlint. Ent. Long) Song Cn int ni Tatatu read data, op! it stop C = tactint (act act in- Peint out in tine! cout and The value in, 1 for 10 and 11 ls 36t. For the caer. the output should be Enter the value of n and 111110center> The value => n, computation terminated. For the case the patched be Enter the values of and 11-24 center The value 0. computation terminated Suppose we have n items, and we want to form groups by choosing r items from then items. The number of different groups of r items each can be computed using the following formula from the probability theory: C(n,r) = n! r!(n-r)! where n! is the factorial of n. Write a C++ program to accept the values n and r, where n is a positive integer and rn, and computes the value Cin,r). Your main program should call a function of integer type to compute the factorial values. Sample of the main program is as below, . void main() long fact(int); void read data (int *, int *, int *); void Print_out (int, int, long); long Cnr; int n, r, status; read_data(&n, er, estop); if (stop == 0) cnr = fact(n)/ (fact (E)fact in - 1)); Print_outin, 1, C_nr); > cout n or/and n nor n The value can,r) for n = 14 and r = 11 is 364. For the case r> n, the output should be: Enter the values of n and r: 11 14
The value r > n, computation terminated. For the case n The value n