Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
12
Task/Ackermann-function/Euphoria/ackermann-function-2.eu
Normal file
12
Task/Ackermann-function/Euphoria/ackermann-function-2.eu
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
function ackermann(integer m, integer n)
|
||||
if m=0 then return n+1
|
||||
elsif m>0 and n=0 then return ackermann(m-1, 1)
|
||||
elsif m>0 and n>0 then return ackermann(m-1, ackermann(m,n-1))
|
||||
else return 0
|
||||
end if
|
||||
return 0
|
||||
end function
|
||||
|
||||
? ackermann(0, 0)
|
||||
? ackermann(3, 4)
|
||||
? ackermann(3, 10)
|
||||
Loading…
Add table
Add a link
Reference in a new issue