var integer IP IL sl real begin sl 000001 while abs s-sl do begin b-a

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var a,b,i,n,c:integer;
h,IP,IL,e,s,sl,x,f:real;
begin
a:=0;b:=1;n:=2;sl:=0;e:=0.000001;c:=0;
while (abs(s-sl)<e) do begin
h:=(b-a)/n;
x:=a+c*h;
s:=0;
for i:=0 to n-1 do begin
F:=sqrt(1+sqr(x));
s:=s+F;
x:=x+h;
end;
s:=s*h;
end;
writeln (n,' ',s);
readln();
end.