Найти сумму ряда с точностью епсилон=10^-3, общий член которого 2n-1/2^n- Pascal(Паскаль)

uses crt;
var e,t,s:real;
    n:integer;
begin
clrscr;
e:=0.001;
n:=1;
t:=2;
s:=1/2;
while abs(2*n-1)/t>e do
 begin
  n:=n+1;
  t:=t*2;
  s:=s+(2*n-1)/t;
 end;
write('S=',s:0:4);
readln
end.

Leave a Comment

8 + 2 =