Ответ:
program Calc;
var
n, s: Double;
i: Integer;
begin
s := 0;
n := 1;
while n <= 1024 do begin
s := s + 1 / n;
n := n * 2;
end;
WriteLn ('Сумма = ', s :20 :20);
ReadLn;
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Ответ:
program Calc;
var
n, s: Double;
i: Integer;
begin
s := 0;
n := 1;
while n <= 1024 do begin
s := s + 1 / n;
n := n * 2;
end;
WriteLn ('Сумма = ', s :20 :20);
ReadLn;
end.