bài tập 4:
uses crt;
var i,n: integer;
s: real;
begin
clrscr;
write ('nhap n: '); readln (n);
for i:=1 to n do s:=s+(1/i);
writeln ('tong la: ',s:1:2);
readln;
end.
bài tập 5:
uses crt;
var i,n: integer;
s: real;
begin
clrscr;
write ('nhap n: '); readln (n);
for i:=1 to n do s:=s+(1/(i*(i+2)));
writeln ('tong la: ',s:1:2);
readln;
end.