program Tinh_S;
var i,n:integer;
S:real;
begin
writeln('Nhap so n=') ; readln(n);
i:=1 ; S:=0;
while i<=n do
begin
S:=S+1/n*(n+1); i:=i+1;
end;
writeln('Tong S=',S);
readln
end.
program Tinh_S;
var i,n:integer;
S:real;
begin
writeln('Nhap so n=') ; readln(n);
i:=1 ; S:=0;
while i<=n do
begin
S:=S+1/n*(n+1); i:=i+1;
end;
writeln('Tong S=',S);
readln
end.
program tinh_tong_S;
var
n: integer;
i: integer;
S: real;
begin
write('Nhap n: ');
readln(n);
S := 0;
i := 1;
while i <= n do
begin
S := S + 1 / (i * (i + 1));
i := i + 1;
end;
writeln('Tong S la: ', S:0:2);
readln;
end.