1: program recursion(input, output); 2: var i : integer; 3: 4: function fact(n : integer) : integer; 5: begin 6: if n <= 1 then begin 7: fact := 1; 8: end else begin 9: fact := n * fact(n-1); 10: end; 11: end; 12: 13: begin 14: i := 3; 15: writeln(i:1, '! = ', fact(i):1); 16: end.