17 lines
307 B
Plaintext
17 lines
307 B
Plaintext
include c:\cxpl\codes;
|
|
|
|
func Ackermann(M, N);
|
|
int M, N;
|
|
[if M=0 then return N+1;
|
|
if N=0 then return Ackermann(M-1, 1);
|
|
return Ackermann(M-1, Ackermann(M, N-1));
|
|
]; \Ackermann
|
|
|
|
int M, N;
|
|
[for M:= 0 to 3 do
|
|
[for N:= 0 to 7 do
|
|
[IntOut(0, Ackermann(M, N)); ChOut(0,9\tab\)];
|
|
CrLf(0);
|
|
];
|
|
]
|