Решить, ) var a,b,t,m,r : integer; function f(x: integer): integer; begin f : = 9 * (x + 19) * (x - 19) + 1; end; begin a : = -20; b : = 20; m : = a; r : = f(a); for t : = a to b do begin if (f(t) < r ) then begin m : = t; r : = f(t) end end; write(m); end.
Исправленный вариант кода:
var
a, b, t, M, R: integer;
function F(x: integer): integer;
begin
F := 9 * (x + 19) * (x - 19) + 1;
end;
begin
a := -20;b := 20;
M := a;R := F(a);
for t := a to b do
begin
if (F(t) < R ) then begin
M := t;
R := F(t)
end
end;
write(M);
end.