program FP;
var a,b,i,n:integer;
h,IP,IL:real;
x:array[0..10] of real;
y:array[0..10] of real;
begin
write('Введите Г*=');
readln(a);
write('Введите b=');
readln(b);
write('Введите n=');
readln(n);
h:=(b-a)/n;
writeln('h=',h);
for i:=0 to n do begin
x[i]:=a+i*h;
writeln('x[',i,']=',x[i]); end;
for i:=0 to n do
begin
y[i]:=(4*x[i]+4)/2;//формула
writeln('y[',i,']=',y[i]); end;
IL:=h*(y[0]+y[1]+y[2]+y[3]+y[4]+y[5]+y[6]+y[7]+y[8]+y[9]);//левый
writeln('IL=',IL);
IP:=h*(y[10]+y[1]+y[2]+y[3]+y[4]+y[5]+y[6]+y[7]+y[8]+y[9]); //правый
writeln('IP=',IP);
readln;
end.