Giai thừa của n: T=1*2*3...*n
program viet_chuong_trinh;
uses crt;
var
i,n,T:integer;
begin
clrscr;
writeln('Moi nhap n = '); readln(n);
T:=1;
for i:=1 to n do T:=T*i;
write(T); readln;
end.
uses crt;
var n:integer;
{-----------------------------------------}
procedure giaithua(var a:integer);
var i:integer;
gt:longint;
begin
gt:=1;
for i:=1 to a do
gt:=gt*i;
write(gt);
end;
{-----------------------------------------}
begin
clrscr;
write('nhap n='); readln(n);
giaithua(n);
readln;
end.