Дано число N. Вычислите сумму S=1/2+2/3+3/4+4/5...+N/(N+1)
Program xxx; uses crt; var n,i:integer; b:real; BEGIN readln(n); for i:=1 to n do begin b:=b+(i/(i+1)); end; writeln(b); END.
Var N,S,k:real; begin read(N); S:=0; for k:=1 to N do S:=S+N/(N+1); write(S); end.