Data update
This commit is contained in:
parent
52a6ef48dd
commit
157b70a810
604 changed files with 14253 additions and 2100 deletions
|
|
@ -0,0 +1,16 @@
|
|||
UInt64 local fn Factorial( n as UInt64 )
|
||||
if ( n == 0 ) then return 1
|
||||
UInt64 result = 1
|
||||
for UInt64 i = n to 1 step -1
|
||||
result *= i
|
||||
next
|
||||
end fn = result
|
||||
|
||||
UInt64 local fn Binomial( n as UInt64, k as UInt64 )
|
||||
UInt64 nFac = fn Factorial(n), kFac = fn Factorial(k), nMinusKFac = fn Factorial( n - k )
|
||||
end fn = nFac / (nMinusKFac * kFac)
|
||||
|
||||
printf @"Binomial(%llu, %llu) = %llu", 5, 3, fn Binomial(5, 3)
|
||||
printf @"Binomial(%llu, %llu) = %llu", 20, 11, fn Binomial(20, 11)
|
||||
|
||||
HandleEvents
|
||||
Loading…
Add table
Add a link
Reference in a new issue