c++ program write a recursive function to find the factorial of a number. main points : 1) n and r are stored in two parallel arrays.  2) you have to read the arrays n and r at run time. 3) compute nCr for each corresponding terms in the array n and r and display it properly formatted  4) also in the program you should print the current date and time using the library functions

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter15: Recursion
Section: Chapter Questions
Problem 12PE
icon
Related questions
Question

c++ program

write a recursive function to find the factorial of a number.

main points :

1) n and r are stored in two parallel arrays. 

2) you have to read the arrays n and r at run time.

3) compute nCr for each corresponding terms in the array n and r and display it properly formatted 

4) also in the program you should print the current date and time using the library functions

 

C. In permutations and combinations, the term "n C r" refers to n combinations
taken r at a time.
n!
nCr =
r! (n -r)!
Write a recursive function to find the factorial of a number.
Use the defined function to compute the term "nCr" for the following scenario:
The values of 'n' and 'r' are stored in two parallel arrays of any user defined
size. You have to Read the arrays n and r at run time. Compute n Crfor each
corresponding terms in the array 'n' and 'r', and display it properly formatted.
Also your program should print the current date and time using library
functions.
Transcribed Image Text:C. In permutations and combinations, the term "n C r" refers to n combinations taken r at a time. n! nCr = r! (n -r)! Write a recursive function to find the factorial of a number. Use the defined function to compute the term "nCr" for the following scenario: The values of 'n' and 'r' are stored in two parallel arrays of any user defined size. You have to Read the arrays n and r at run time. Compute n Crfor each corresponding terms in the array 'n' and 'r', and display it properly formatted. Also your program should print the current date and time using library functions.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr