Advertisement
MadCortez

Untitled

Oct 3rd, 2020
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.34 KB | None | 0 0
  1. var
  2.    a, b, c, d: Integer;
  3.    function min(a,b:longint):longint;
  4.    begin
  5.       if a>b then
  6.          min:=b
  7.       else
  8.          min:=a;
  9.    end;
  10.    function max(a,b:longint):longint;
  11.    begin
  12.       if a>b then
  13.          max:=a
  14.       else
  15.          max:=b;
  16.    end;
  17. begin
  18.    readln(a, b, c, d);
  19.    writeln(min(max(a,b),max(c,d)));
  20. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement