algorithm-in-python/parser/PL0-compiler/test/txt/factorial.txt

13 lines
139 B
Plaintext
Raw Normal View History

2019-03-15 16:37:02 +08:00
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
.