Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,23 +0,0 @@
|
|||
Function catalan(n)
|
||||
catalan = factorial(2*n)/(factorial(n+1)*factorial(n))
|
||||
End Function
|
||||
|
||||
Function factorial(n)
|
||||
If n = 0 Then
|
||||
Factorial = 1
|
||||
Else
|
||||
For i = n To 1 Step -1
|
||||
If i = n Then
|
||||
factorial = n
|
||||
Else
|
||||
factorial = factorial * i
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Function
|
||||
|
||||
'Find the first 15 Catalan numbers.
|
||||
For j = 1 To 15
|
||||
WScript.StdOut.Write j & " = " & catalan(j)
|
||||
WScript.StdOut.WriteLine
|
||||
Next
|
||||
Loading…
Add table
Add a link
Reference in a new issue