given a function that gets 3 numbers and outputs the maximal of them, I have to find using only this function the minimal number out of 3 given numbers.
max(x1,x2,x3) returns maximal value
for now, I think I should get the sum of all the 3 numbers, and subtract then the max(x1,x2,x3) but yet I have to subtract the smaller maximal out of the remained.
would appreciate your help,
ok, found out by myself. I should multiply x1, x2, x3, - everyone of them by -1.
In this way, the maximal number turns into the minimal and vice versa.