title: Middle Of Three Using Minimum Comparisons
signature: middleOfThreeUsingMinimumComparisons :: Integer -> Integer -> Integer -> Integer
  middleOfThreeUsingMinimumComparisons a b c = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Integer -> Integer -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: Integer -> Integer -> Integer -> Integer -> String
  driver a b c expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME a b c) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (56) (5) (82) (56) )
  
      printf "TEST-1...%s\n" (driver (56) (60) (17) (56) )
  
      printf "TEST-2...%s\n" (driver (36) (56) (51) (51) )
  
      printf "TEST-3...%s\n" (driver (71) (54) (6) (54) )
  
      printf "TEST-4...%s\n" (driver (3) (70) (81) (70) )
  
      printf "TEST-5...%s\n" (driver (84) (57) (47) (57) )
  
      printf "TEST-6...%s\n" (driver (30) (80) (85) (80) )
  
      printf "TEST-7...%s\n" (driver (82) (54) (32) (54) )
  
      printf "TEST-8...%s\n" (driver (90) (70) (55) (70) )
  
      printf "TEST-9...%s\n" (driver (38) (4) (5) (5) )
  
source_py: def middle_of_three_using_minimum_comparisons(a, b, c):
      if (((a < b) and (b < c)) or ((c < b) and (b < a))):
          return b
      if (((b < a) and (a < c)) or ((c < a) and (a < b))):
          return a
      else:
          return c
source_cpp: int middle_of_three_using_minimum_comparisons(int a, int b, int c) {
    if ( ( a < b && b < c ) || ( c < b && b < a ) ) return b;
    else if ( ( b < a && a < c ) || ( c < a && a < b ) ) return a;
    else return c;
  }