Ответ:
Объяснение:
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));
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
Объяснение:
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.