[Solved] Combination formula “n! / ((n-k)!*k!)” doesn’t work [closed]


This line:

result = n! / ((n-k)!*k!);

…is not valid C code. ! in C means “not”.

You will need to provide a factorial function so that you can call:

  result = factorial(n) / (factorial(n-k) * factorial(k));

solved Combination formula “n! / ((n-k)!*k!)” doesn’t work [closed]