Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
16
Task/Ackermann-function/XPL0/ackermann-function.xpl0
Normal file
16
Task/Ackermann-function/XPL0/ackermann-function.xpl0
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
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);
|
||||
];
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue