langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
20
Task/Mutual-recursion/PL-I/mutual-recursion.pli
Normal file
20
Task/Mutual-recursion/PL-I/mutual-recursion.pli
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
test: procedure options (main);
|
||||
|
||||
M: procedure (n) returns (fixed) recursive; /* 8/1/2010 */
|
||||
declare n fixed;
|
||||
if n <= 0 then return (0);
|
||||
else return ( n - F(M(n-1)) );
|
||||
end M;
|
||||
|
||||
F: procedure (n) returns (fixed) recursive;
|
||||
declare n fixed;
|
||||
if n <= 0 then return (1);
|
||||
else return ( n - M(F(n-1)) );
|
||||
end F;
|
||||
|
||||
declare i fixed;
|
||||
|
||||
do i = 1 to 15;
|
||||
put skip list ( F(i), M(i) );
|
||||
end;
|
||||
end test;
|
||||
Loading…
Add table
Add a link
Reference in a new issue