Program HOC24;
uses crt;
var i,n: integer;
s: real;
begin
clrscr;
write('Nhap n: '); readln(n);
s:=0;
for i:=1 to n do s:=s+1/(i*(i+1));
write('S= ',s:6:2);
readln
end.
Program HOC24;
var i,n: integer;
S: real;
begin
write('Nhap N: '); readln(n);
i:=1; s:=0;
while i<=n do
begin
s:=s+i*(i+1);
i:=i+1;
end;
write('S=',S:5:2);
readln
end.