Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
double computeBinominal(int n, int k)
{
double value = 1.0;
for (int i = 1; i <= k; i++)
{
value = value * ((n + 1 - i) / i);
}
if (n == k){
value = 1;
}
return value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment