program funk;
uses crt;
var x:integer; n:byte;
function fact(var k:byte):integer;
var i,p:integer;
begin
p:=1;
for i:=1 to k do
p:=p*i;
fact:=p;
end;
BEGIN
write('Ededi daxil et'); readln(n);
x:=fact(n);
writeln(n,'faktorial=', x);
readln
END.
