Загрузка данных


var a, b, c, x, x_end, dx, f: real;
begin
  Write('Введите a, b, c, Xнач, Xкон, dX: ');
  ReadLn(a, b, c, x, x_end, dx);
  WriteLn('      X    |       F');

  while x <= x_end + 1e-9 do
  begin
    Write(x:10:2, ' | ');
    if (x < 3) and (b <> 0) then f := a * Sqr(x) - b * x + c
    else if (x > 3) and (b = 0) and (x <> c) then f := (x - a) / (x - c)
    else if (not ((x > 3) and (b = 0))) and (c <> 0) then f := x / c
    else begin WriteLn('Деление на 0'); x := x + dx; Continue; end;

    if Trunc(a * b * c) mod 4 = 0 then WriteLn(f:12:4) else WriteLn(Trunc(f):12);
    x := x + dx;
  end;
end.