CJCoding With Joseph

Middle of Three Numbers

Read three integers with scanf and print the middle one (the median: not the largest and not the smallest), with no trailing newline. Assume the three values are different. For input 3 1 2 the output is 2; for input 7 5 9 the output is 7.

Expected Output:

2
Topics:
If Statements
๐Ÿ“ฅ Auto-Input:
3 1 2\n
This input is automatically fed to your program's stdin
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (p, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.