Created
August 28, 2021 17:01
-
-
Save markusbuchholz/93403be2c57e7e45236e6ce7d348112a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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