title: Middle Of Three Using Minimum Comparisons
signature: middleOfThreeUsingMinimumComparisons(a, b, c) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(a, b, c, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(a, b, c), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          56, 5, 82, 
          56)
      }");
  
      print("TEST-1...${driver(
          56, 60, 17, 
          56)
      }");
  
      print("TEST-2...${driver(
          36, 56, 51, 
          51)
      }");
  
      print("TEST-3...${driver(
          71, 54, 6, 
          54)
      }");
  
      print("TEST-4...${driver(
          3, 70, 81, 
          70)
      }");
  
      print("TEST-5...${driver(
          84, 57, 47, 
          57)
      }");
  
      print("TEST-6...${driver(
          30, 80, 85, 
          80)
      }");
  
      print("TEST-7...${driver(
          82, 54, 32, 
          54)
      }");
  
      print("TEST-8...${driver(
          90, 70, 55, 
          70)
      }");
  
      print("TEST-9...${driver(
          38, 4, 5, 
          5)
      }");
  
      return 0;
  }
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;
  }