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,i,t:LongInt;
begin
clrscr;
write('nhap n:');readln(n);
clrscr;
t:=1;
for i:=2 to n do t:=t*n;
write('t=',t);
readln;
end.
cái này giống bài giai thừa n đó bạn
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.