Var h:integer; begin h:=40; line(window.Width-300,window.Height,window.Width-300,0); floodfill(window.Width-20,20,clGray); rectangle(window.Width-200,100,window.Width-100,300); floodfill(window.Width-150,140,clGold); while h<>window.Height-40 do begin circle(window.Width div 2,h-40,10); floodfill(window.Width div 2,h-40,clGreen); circle(window.Width div 2,h,30); floodfill(window.Width div 2,h,clRed); rectangle(0,0,window.Width div 2+40,window.Height); floodfill(window.Width div 2+40,window.Height,clWhite); inc(h); end; circle(window.Width div 2,h-40,10); floodfill(window.Width div 2,h-40,clGreen); circle(window.Width div 2,h,30); floodfill(window.Width div 2,h,clRed); 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.
Uses
GraphABC;
Var
h:integer;
begin
h:=40;
line(window.Width-300,window.Height,window.Width-300,0);
floodfill(window.Width-20,20,clGray);
rectangle(window.Width-200,100,window.Width-100,300);
floodfill(window.Width-150,140,clGold);
while h<>window.Height-40 do
begin
circle(window.Width div 2,h-40,10);
floodfill(window.Width div 2,h-40,clGreen);
circle(window.Width div 2,h,30);
floodfill(window.Width div 2,h,clRed);
rectangle(0,0,window.Width div 2+40,window.Height);
floodfill(window.Width div 2+40,window.Height,clWhite);
inc(h);
end;
circle(window.Width div 2,h-40,10);
floodfill(window.Width div 2,h-40,clGreen);
circle(window.Width div 2,h,30);
floodfill(window.Width div 2,h,clRed);
end.