Open In App

GATE | GATE-CS-2017 (Set 1) | Question 8

The expression [ (x + y) – |x – y| ] / 2 is equal to
(A) the maximum of x and y
(B) the minimum of x and y
(C) 1
(D) none of the above

Answer: (B)
Explanation: As we know that, if x > y, then |x – y| = x – y and
if x < y then |x – y| = y – x , because value of |x – y| is always non-negative.
Therefore,

Therefore in both the case we get minimum of (x,y). So, option B

Note that you can take some random values of x and y, then verify given options.
Quiz of this Question

Article Tags :