I'm doing this REALLY SIMPLE exercise to determine the max value of 4 integers. I have two functions to compare, one is working but fail in some cases (3/5) and I can't figure out what's wrong. I want to understand what's the difference between these two functions, they look exactly the same but one give the wrong answer. I will give an input example where one of the function fail to return the correct value.
The first function (returning the wrong value)
The second function (works well)
Either I must be tired or just simply dumb that I can't figure out the logic difference between these two function. Any enlightenment ?