algorithm-in-python/parser/PL0-compiler/test/txt/factorial.txt
2019-03-15 16:37:02 +08:00

13 lines
139 B
Plaintext

func f(n)
begin
if n=1 then return 1;
return n*f(n-1);
end;
var a;
begin
a:=f(10);
print('factorial 10 is %d',a);
end
.