2 câu trả lời
program oken;
uses crt;
var n,i: integer;
gt: qword;
begin
write('nhap n: '): readln(n);
gt:=1;
for i:=1 to n do gt:=gt*i;
writeln('N!=',gt);
readln;
end.
program tinh_giai_thua;
uses crt;
var N,i: integer;
P: longint;
begin
clrscr;
write(' N = '); readln(N);
P:=1;
for i:=1 to N do P:=P*i;
writeln( N,'! = ',P);
readln
end.
Câu hỏi trong lớp
Xem thêm