var a, b, c, d, min, max: integer;
begin
// Min
readln(a, b, c, d);
if (a <= b) and (a <= c) and (a <= d) then min := a
else if (b <= a) and (b <= c) and (b <= d) then min := b
else if (c <= a) and (c <= b) and (c <= d) then min := c
else if (d <= a) and (d <= b) and (d <= c) then min := d;
// Max
if (a >= b) and (a >= c) and (a >= d) then max := a
else if (b >= a) and (b >= c) and (b >= d) then max := b
else if (c >= a) and (c >= b) and (c >= d) then max := c
else if (d >= a) and (d >= b) and (d >= c) then max := d;
writeln('Min: ', min);
writeln('Max: ', max);
end.
uses GraphABC;
const
scale = 20;
step = 0.001;
var
x0, y0, x1, y1: integer;
x, y, min, max, a, b, c: real;
begin
setwindowsize(1000, 800);
DrawInBuffer := true;
// write(' введите промежуток для функции(min значение-enter- max значение) ');
// read(min, max);
writeln('a=');
read(a);
writeln('b=');
read(b);
writeln('c=');
read(c);
x0 := WindowWidth div 2;
y0 := WindowHeight div 2;
line(20, y0, WindowWidth - 20, y0);
line(x0, 20, x0, WindowHeight - 20);
min := trunc((20 - x0) / scale);
max := trunc((WindowWidth - 20 - x0) / scale);
x := min;
while x <= max do
begin
x1 := trunc(x0 + x * scale);
y := a * x * x * x + b * x * x + c;
y1 := trunc(y0 - y * scale);
PutPixel(x1, y1, clGreen);
y := a * x * abs(sin(x));
y1 := trunc(y0 - y * scale);
PutPixel(x1, y1, clBlue);
x := x + step;
end;
end.
var a, b, c, d, min, max: integer;
begin
// Min
readln(a, b, c, d);
if (a <= b) and (a <= c) and (a <= d) then min := a
else if (b <= a) and (b <= c) and (b <= d) then min := b
else if (c <= a) and (c <= b) and (c <= d) then min := c
else if (d <= a) and (d <= b) and (d <= c) then min := d;
// Max
if (a >= b) and (a >= c) and (a >= d) then max := a
else if (b >= a) and (b >= c) and (b >= d) then max := b
else if (c >= a) and (c >= b) and (c >= d) then max := c
else if (d >= a) and (d >= b) and (d >= c) then max := d;
writeln('Min: ', min);
writeln('Max: ', max);
end.