Объяснение:
1.
var
k:integer;
p:integer;
n:integer;
begin
readln(n);
p:=1;
k:=1;
while (k <= n) do begin
p:=p*k;
k:=k+1;
end;
writeln(p);
end.
2.
p:real;
for k:=2 to n do begin
p:=p*(1 - (1/k));
Объяснение:
1.
var
k:integer;
p:integer;
n:integer;
begin
readln(n);
p:=1;
k:=1;
while (k <= n) do begin
p:=p*k;
k:=k+1;
end;
writeln(p);
end.
2.
var
k:integer;
p:real;
n:integer;
begin
readln(n);
p:=1;
for k:=2 to n do begin
p:=p*(1 - (1/k));
end;
writeln(p);
end.