*Đối với for...to...do:
Uses crt;
Var i,N :integer;
T:longint;
Begin
Writeln('Nhap N vao:'); Readln(n);
T:=1;
For i:=1 to n do T:= T*i;
Write('tich cua ',N,' so tu nhien dau tien la:',T);
Readln
End.
*Đối với While...do:
Uses crt;
Var i,N :integer;
T:longint;
Begin
Write('Nhap N vao:'); Readln(n);
T:=1; i:=0;
While i<=n do
begin
i:=i+1;
T:=T*i;
End;
Write('tich cua ',N,' so tu nhien dau tien la:',T);
Readln
End.
*Nhớ tick và chọn làm câu trả lời hay nhất giúp mình nhé! Thanks so much ;333
p/s: Chưa yên tâm thì có thể check lại.Hỏi và đáp, comment bên dưới :D