program tiktortburiw_adis;
uses crt;
var y, a, b, dx, xi:double;
n, i:integer;
y:double;
begin
clrscr;
writeln('Interval basyn, sonyn jane nomirin engiziniz:');
readln(a,b,n);
dx:=(b-a)/n;
for i:=1 to n do begin
xi = a + (i-0.5d0)*dx;
y = y + f(xi)*dx; end;
writeln('f(x) kvadrat = ',y:2:2);
readln;
end.
uses crt;
var y, a, b, dx, xi:double;
n, i:integer;
y:double;
begin
clrscr;
writeln('Interval basyn, sonyn jane nomirin engiziniz:');
readln(a,b,n);
dx:=(b-a)/n;
for i:=1 to n do begin
xi = a + (i-0.5d0)*dx;
y = y + f(xi)*dx; end;
writeln('f(x) kvadrat = ',y:2:2);
readln;
end.