Middle of Three
Submissions: 3391   Accuracy:

49.45%

  Difficulty: Basic   Marks: 1

Given three distinct numbers, find the number with value in middle (Try to do it with minimum comparisons).

Input:
First line contains an integer, the number of test cases 'T'. Each test case should contain three distinct numbers a, b and c.


Output:
Print middle of three numbers.


Constraints: 
1 <= T <= 100
-1000 <= a, b, c <= 1000


Example:
Input:
2
20 30 40
12 32
11

Output:
30
12

** For More Input/Output Examples Use 'Expected Output' option **

Author: kartik


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.