title: Middle Of Three Using Minimum Comparisons 1
signature: function middle_of_three_using_minimum_comparisons_1(a, b, c)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(a, b, c, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(a, b, c), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(43, 24, 7, 24);
      @printf("TEST-0...%s\n",result);
      
      result = driver(76, 54, 66, 66);
      @printf("TEST-1...%s\n",result);
      
      result = driver(57, 5, 40, 40);
      @printf("TEST-2...%s\n",result);
      
      result = driver(10, 13, 4, 10);
      @printf("TEST-3...%s\n",result);
      
      result = driver(59, 47, 56, 56);
      @printf("TEST-4...%s\n",result);
      
      result = driver(92, 14, 50, 50);
      @printf("TEST-5...%s\n",result);
      
      result = driver(49, 62, 65, 62);
      @printf("TEST-6...%s\n",result);
      
      result = driver(16, 95, 12, 16);
      @printf("TEST-7...%s\n",result);
      
      result = driver(33, 41, 90, 41);
      @printf("TEST-8...%s\n",result);
      
      result = driver(66, 63, 46, 63);
      @printf("TEST-9...%s\n",result);
      
  end
  
  main()
source_py: def middle_of_three_using_minimum_comparisons_1(a, b, c):
      if (a > b):
          if (b > c):
              return b
          elif (a > c):
              return c
          else:
              return a
      elif (a > c):
          return a
      elif (b > c):
          return c
      else:
          return b
source_cpp: int middle_of_three_using_minimum_comparisons_1(int a, int b, int c) {
    if ( a > b ) {
      if ( b > c ) return b;
      else if ( a > c ) return c;
      else return a;
    }
    else {
      if ( a > c ) return a;
      else if ( b > c ) return c;
      else return b;
    }
  }