A PLATFORM TO LEARN | CODE | ACHIEVE
" Programming is the real test of your creativity,its all about how you turn ideas into codes. "
nCr & nPr CALCULATOR :
ENTER THE VALUES OF n & r :10 8
10C8 : 45
10P8 : 1814400
What we did - Our Approach
In this problem we have to generate the measure of nCr and nPr for given values of 'n' and 'r'.
We have following formulaes to calculate nCr and nPr respectively :
nCr = n! / r!*(n-r)!
nPr = n! /(n-r)!
Now after breaking this formula,we see that,all we have to do is find the factorial of each parameter i.e n,r,n-r. So,after finding the factorial,we put the values in formula.
INTERESTING READ FOR YOU :
For any Queries,suggestions,feel free to Mail us at :
For reporting any kind of copyright voilation,mail us at : email@example.com
© copyright CODE OF GEEKS 2018