Ответ:
Объяснение:
1.
// описание функции, ее можно менять
function func(in_x:real):real;
begin
func:=-2*in_x*in_x*in_x*in_x*in_x + 4;
end;
var
h:real;
x:real;
a, b:real;
count_otr:integer;
begin
writeln('Input a = ');
readln(a);
writeln('Input b = ');
readln(b);
writeln('Input h = ');
readln(h);
count_otr:=0;
x:=a;
while (x <= b) do begin</p>
{writeln('x = ', x:3:3, ' f = ', func(x));}
if (func(x)<0) then count_otr:=count_otr + 1;</p>
x:=x+h;
end;
writeln(count_otr);
readln;
end.
2.
function func(in_x:real):real;
begin
func:=-2*in_x*in_x*in_x*in_x*in_x + 4;
end;
var
h:real;
x:real;
a, b:real;
f_min, x_min:real;
begin
writeln('Input a = ');
readln(a);
writeln('Input b = ');
readln(b);
writeln('Input h = ');
readln(h);
x_min:=a;
f_min:=func(a);
x:=a+h;
while (x <= b) do begin</p>
{writeln('x = ', x:3:3, ' f = ', func(x));}
if (func(x)
x:=x+h;
end;
writeln('x min = ', x_min:3:3, ', f min = ', func(x_min):3:3);
readln;
end.