sdfsdf

Delphi code posted by qwerty
created at 04 Oct 13:41

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
program factorial;

function fact(n: integer): longint;
begin
    if (n = 0) then
        fact := 1
    else
        fact := n * fact(n - 1);
end;

var
    n: integer;

begin
    for n := 0 to 16 do
        writeln(n, '! = ', fact(n));
end.
256 Bytes in 3 ms with coderay