Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
22
Task/Ackermann-function/FBSL/ackermann-function-1.fbsl
Normal file
22
Task/Ackermann-function/FBSL/ackermann-function-1.fbsl
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#APPTYPE CONSOLE
|
||||
|
||||
TestAckermann()
|
||||
|
||||
PAUSE
|
||||
|
||||
SUB TestAckermann()
|
||||
FOR DIM m = 0 TO 3
|
||||
FOR DIM n = 0 TO 10
|
||||
PRINT AckermannF(m, n), " ";
|
||||
NEXT
|
||||
PRINT
|
||||
NEXT
|
||||
END SUB
|
||||
|
||||
FUNCTION AckermannF(m AS INTEGER, n AS INTEGER) AS INTEGER
|
||||
IF NOT m THEN RETURN n + 1
|
||||
IF NOT n THEN RETURN AckermannA(m - 1, 1)
|
||||
RETURN AckermannC(m - 1, AckermannF(m, n - 1))
|
||||
END FUNCTION
|
||||
|
||||
DYNC AckermannC(m AS INTEGER, n AS INTEGER) AS INTEGER
|
||||
Loading…
Add table
Add a link
Reference in a new issue