program gtN;
var n,i: integer;
gt: longint;
begin
write('Giai thua cua n='); readln(n);
gt:=1;
if N<0 then writeln(#7,'Khong duoc vi N<0')
else
begin
if N>0 then
for i:=1 to N do gt:=gt*i;
writeln(N,'!=',gt);
end;
readln
end.
{Hay lap chuong trinh con tinh N! (toi da 7!.}
{program GTNCCT;
var i,t,N: integer;
function gt(N: integer): integer;
begin
if N=0 then gt:=1
else
begin
t:=1;
for i:=1 to N do t:=t*i;
gt:=t;
end;
end;
begin
write('Giai thua N='); readln(N);
writeln(N,'!=',gt(n));
readln
end.