Jump to content

Evaluate binomial coefficients: Difference between revisions

Restored formula visibility on main OS X browsers by removing redundant expression-flanking spaces from math tags
(Add a different solution that uses `product` over ranges.)
(Restored formula visibility on main OS X browsers by removing redundant expression-flanking spaces from math tags)
Line 2:
This programming task, is to calculate ANY binomial coefficient.
 
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:
<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>
</big></big>
 
9,659

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.