Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

program Pr115_3; var k, n : integer; suma : real; begin readln(n); suma := 0; for k := 1 to n do suma := suma + 1 / sqr(2*k+1); writeln(suma); readln; end.

program Pr115_3;
var
  k, n : integer;
  suma : real;

begin
  readln(n);
  suma := 0;
  for k := 1 to n do
  suma := suma + 1 / sqr(2*k+1);
  writeln(suma);
  readln;
end.
Source by abramov.org.ua #
 
PREVIOUS NEXT
Tagged: #program #var #suma #suma #suma #suma
ADD COMMENT
Topic
Name
6+6 =