program ho_tro;
uses crt;
var s,n,i: integer;
begin
clrscr;
writeln(' nhap so n:'); readln(n);
s:=1;
for i:=1 to n do
s:=s*i;
writeln(' tich cua day tren la:',s);
readln;
end.
program ho_tro;
uses crt;
var s,n,i: integer;
begin
clrscr;
writeln(' nhap so n:'); readln(n);
s:=1;
for i:=1 to n do
s:=s*i*i;
writeln(' tich cua day tren la:',s);
readln;
end.
1:
uses crt;
var i,n:integer;
s:longint;
begin
clrscr;
write('n='); readln(n);
s:=1;
for i:=1 to n do
s:=s*i;
writeln(n,'!'=',s);
readln;
end.
2:
uses crt;
var i,n:integer;
s:longint;
begin
clrscr;
write('n='); readln(n);
s:=1;
for i:=1 to n do
s:=s*sqr(i);
writeln('tich la: ',s);
readln;
end.