1: tính tổng của \(S=1+\frac{1}{2^2}+\frac{1}{3^2}+\frac{1}{4^2}+...+\frac{1}{100^2}\)
uses crt;
var s:real;
i:integer;
begin
clrscr;
s:=0;
for i:=1 to 100 do
s:=s+1/(sqr(i));
writeln('tong cua day so la: ',s);
readln;
end.
2: tính tổng \(S=1+\frac{1}{3^2}+\frac{1}{5^2}+\frac{1}{7^2}+...+\frac{1}{n^2}\)
uses crt;
var s:real;
n,i:integer;
begin
clrscr;
write('n='); readln(n);
s:=0;
for i:=1 to n do
if i mod 2=1 then s:=s+1/(sqr(i));
writeln('tong cua day so la: ',s:4:2);
readln;
end.