Прогрессия неправильная, т.к. первый элемент должен быть 1+1/1 = 2
var b,sum:real; count, n:integer; begin readln(b); count:=0; n:=1; while count<>3 do begin if (1+1/n)<b then begin sum:=sum+(1+1/n); count:=count+1; end; n:=n+1; end; writeln('suma: ',sum); end.
var b,sum:real; count, n:integer;
begin
readln(b);
count:=0;
n:=1;
while count<>3 do begin
if (1+1/n)<b then begin
sum:=sum+(1+1/n);
count:=count+1;
end;
n:=n+1;
end;
writeln('suma: ',sum);
end.