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

Function NCR

Arrays/NCRcombination.c:17–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15 return num/den;
16}
17int NCR(int n,int r)
18{
19 if(n==r || r==0)
20 return 1;
21 return NCR(n-1,r-1)+NCR(n-1,r);
22
23}
24int main()
25{
26 printf("%d \n",NCR(5,3));

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected