26 lines
437 B
Plaintext
26 lines
437 B
Plaintext
procedure acker(i, j)
|
|
static memory
|
|
|
|
initial {
|
|
memory := table()
|
|
every memory[0 to 100] := table()
|
|
}
|
|
|
|
if i = 0 then return j + 1
|
|
|
|
if j = 0 then /memory[i][j] := acker(i - 1, 1)
|
|
else /memory[i][j] := acker(i - 1, acker(i, j - 1))
|
|
|
|
return memory[i][j]
|
|
|
|
end
|
|
|
|
procedure main()
|
|
every m := 0 to 3 do {
|
|
every n := 0 to 8 do {
|
|
writes(acker(m, n) || " ")
|
|
}
|
|
write()
|
|
}
|
|
end
|