Câu 1:
Program HOC24;
var i,n: integer;
t: longint;
write('Nhap N: '); readln(n);
t:=1;
for i:=1 to n do t:=t*i;
write(n,'! = ',t);
readln
end.
Câu 2:
Program HOC24;
var i,n: integer;
S: real;
begin
write('Nhap n: '); readln(n);
S:=0;
for i:=1 to n do S:=S+1/i;
write('S = ',s);
readln
end.