without using max function get the max value code example Example: return max(max(a,b),max(c,d)); return max(max(a,b),max(c,d));