Compare 4 input numbers:

if
( a > b )
x = a;
else
x = b;
if
( c > d )
y = c;
else
y = d;
if
( x > y )
max = x;
else
max = y;

a

b
c

d
x

y
max