Evaluate binomial coefficients: Difference between revisions
Content added Content deleted
Alextretyak (talk | contribs) (Added 11l) |
|||
Line 15: | Line 15: | ||
{{Template:Combinations and permutations}} |
{{Template:Combinations and permutations}} |
||
<br> |
<br> |
||
=={{header|11l}}== |
|||
{{trans|Python}} |
|||
<lang 11l>F binomial_coeff(n, k) |
|||
V result = 1 |
|||
L(i) 1..k |
|||
result = result * (n - i + 1) / i |
|||
R result |
|||
print(binomial_coeff(5, 3))</lang> |
|||
{{out}} |
|||
<pre> |
|||
10 |
|||
</pre> |
|||
=={{header|360 Assembly}}== |
=={{header|360 Assembly}}== |