title: Middle Of Three Using Minimum Comparisons 2
signature: middleOfThreeUsingMinimumComparisons2 :: Integer -> Integer -> Integer -> Integer
  middleOfThreeUsingMinimumComparisons2 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 (48) (46) (38) (46) )
  
      printf "TEST-1...%s\n" (driver (93) (34) (11) (34) )
  
      printf "TEST-2...%s\n" (driver (58) (78) (6) (58) )
  
      printf "TEST-3...%s\n" (driver (13) (3) (23) (13) )
  
source_py: def middle_of_three_using_minimum_comparisons_2(a, b, c):
      x = (a - b)
      y = (b - c)
      z = (a - c)
      if ((x * y) > 0):
          return b
      elif ((x * z) > 0):
          return
      else:
          return a
source_cpp: int middle_of_three_using_minimum_comparisons_2(int a, int b, int c) {
    int x = a - b;
    int y = b - c;
    int z = a - c;
    if ( x * y > 0 ) return b;
    else if ( x * z > 0 ) return c;
    else return a;
  }