Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
19
Task/Ackermann-function/Ring/ackermann-function.ring
Normal file
19
Task/Ackermann-function/Ring/ackermann-function.ring
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
for m = 0 to 3
|
||||
for n = 0 to 4
|
||||
see "Ackermann(" + m + ", " + n + ") = " + Ackermann(m, n) + nl
|
||||
next
|
||||
next
|
||||
|
||||
func Ackermann m, n
|
||||
if m > 0
|
||||
if n > 0
|
||||
return Ackermann(m - 1, Ackermann(m, n - 1))
|
||||
but n = 0
|
||||
return Ackermann(m - 1, 1)
|
||||
ok
|
||||
but m = 0
|
||||
if n >= 0
|
||||
return n + 1
|
||||
ok
|
||||
ok
|
||||
Raise("Incorrect Numerical input !!!")
|
||||
Loading…
Add table
Add a link
Reference in a new issue