program Calc;
var
i, n, m: Integer;
s: Double;
begin
Write ('Количество членов ряда = ');
ReadLn (m);
s := 0.5;
n := 1;
for i := 2 to m do begin
s := s + n / (i * 2);
n := -n;
end;
WriteLn ('S = ', s :20 :20);
ReadLn;
end.
program Calc;
var
i, n, m: Integer;
s: Double;
begin
Write ('Количество членов ряда = ');
ReadLn (m);
s := 0.5;
n := 1;
for i := 2 to m do begin
s := s + n / (i * 2);
n := -n;
end;
WriteLn ('S = ', s :20 :20);
ReadLn;
end.