program SumSeries;varn, i: integer;S: real;beginwrite('Enter the value of n: ');readln(n);
S := 0;
for i := 3 to n step 2 dobeginS := S + 1 / i;end;
writeln('Sum of the series for n = ', n, ' is ', S:0:2);end.
program SumSeries;
var
n, i: integer;
S: real;
begin
write('Enter the value of n: ');
readln(n);
S := 0;
for i := 3 to n step 2 do
begin
S := S + 1 / i;
end;
writeln('Sum of the series for n = ', n, ' is ', S:0:2);
end.