September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
|
|
@ -1,21 +1,18 @@
|
|||
Public Function ackermann (m as Float, n as Float) as Float
|
||||
If m = 0 then
|
||||
return n + 1
|
||||
end If
|
||||
If n = 0 then
|
||||
return ackermann(m - 1, 1)
|
||||
end If
|
||||
return ackermann(m - 1, ackermann(m, n - 1))
|
||||
|
||||
Public Function Ackermann(m As Float, n As Float) As Float
|
||||
If m = 0 Then
|
||||
Return n + 1
|
||||
End If
|
||||
If n = 0 Then
|
||||
Return Ackermann(m - 1, 1)
|
||||
End If
|
||||
Return Ackermann(m - 1, Ackermann(m, n - 1))
|
||||
End
|
||||
|
||||
|
||||
Public Sub Main()
|
||||
Dim m, n as Float
|
||||
For m = 0 to 3
|
||||
For n = 0 to 4
|
||||
print "Ackerman(";m;",";n;")=";ackermann(m, n)
|
||||
Next
|
||||
Next
|
||||
|
||||
Dim m, n As Float
|
||||
For m = 0 To 3
|
||||
For n = 0 To 4
|
||||
Print "Ackermann("; m; ", "; n; ") = "; Ackermann(m, n)
|
||||
Next
|
||||
Next
|
||||
End
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue