MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / nCr

Function nCr

Arrays/NCRcombination.c:8–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6 return fact(n-1)*n;
7}
8int nCr(int n,int r)
9{
10 int num,den;
11
12 num=fact(n);
13 den=fact(r)*fact(n-r);
14
15 return num/den;
16}
17int NCR(int n,int r)
18{
19 if(n==r || r==0)

Callers

nothing calls this directly

Calls 1

factFunction · 0.70

Tested by

no test coverage detected