项目作者: unzh-boop

项目描述 :
Computes nCr and prints current system time.
高级语言: C++
项目地址: git://github.com/unzh-boop/nCr-computation.git
创建时间: 2021-03-31T11:13:05Z
项目社区:https://github.com/unzh-boop/nCr-computation

开源协议:

下载


nCr computation

Write a C++ program to compute the nCr

In permutations and combinations, the term nCr refers to n combinations taken r at a time.

nCr=n!/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 runtime. Compute nCr for each corresponding term n and r and store it in another separate array and display the output array properly formatted.
  • Also, your program should print the current system date and time using the library functions.