Evaluate binomial coefficients: Difference between revisions

Content added Content deleted
m (added whitespace before the TOC (table of contents), shown the formula with a bigger font to make it easier to read the italics.)
Line 2: Line 2:
This programming task, is to calculate ANY binomial coefficient.
This programming task, is to calculate ANY binomial coefficient.


However, it has to be able to output <math>\binom{5}{3}</math>, which is 10.
However, it has to be able to output &nbsp; <big><big><math> \binom{5}{3} </math></big></big>, &nbsp; which is &nbsp; '''10'''.


This formula is recommended:
This formula is recommended:
<big><big>
: <math>\binom{n}{k} = \frac{n!}{(n-k)!k!} = \frac{n(n-1)(n-2)\ldots(n-k+1)}{k(k-1)(k-2)\ldots 1}</math>
:: <math> \binom{n}{k} = \frac{n!}{(n-k)!k!} = \frac{n(n-1)(n-2)\ldots(n-k+1)}{k(k-1)(k-2)\ldots 1} </math>
</big></big>



'''See Also:'''
'''See Also:'''
Line 11: Line 14:
* [[Pascal's triangle]]
* [[Pascal's triangle]]
{{Template:Combinations and permutations}}
{{Template:Combinations and permutations}}
<br>


=={{header|360 Assembly}}==
=={{header|360 Assembly}}==