PascalABC.NET 3.6.2
begin
var func : real -> real := k ->(k + 1)/(k**2 + 1);
var s: real := 0;
var n := readinteger();
for var i := 1 to n do s += func(i);
s.Println;
end.
input/output:
>>> 9
>>> 3.13448882499098
PascalABC.NET 3.6.2
begin
var func : real -> real := k ->(k + 1)/(k**2 + 1);
var s: real := 0;
var n := readinteger();
for var i := 1 to n do s += func(i);
s.Println;
end.
input/output:
>>> 9
>>> 3.13448882499098