if (a > b) { if (c > d) max = (a > c) ? a : c; else max = (a > d) ? a : d; } else { if (c > d) max = (b > c) ? b : c; else max = (b > d) ? b : d; }
max = (a > b) ? ( (c>d) ? ( (c>a)?c:a ) : ( (d>a)?d:a ) ) : ( (c>d) ? ( (c>b)?c:b ) : ( (d>b)?d:b ) );