title: Middle Of Three Using Minimum Comparisons 1
signature: middleOfThreeUsingMinimumComparisons1(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(
          43, 24, 7, 
          24)
      }");
  
      print("TEST-1...${driver(
          76, 54, 66, 
          66)
      }");
  
      print("TEST-2...${driver(
          57, 5, 40, 
          40)
      }");
  
      print("TEST-3...${driver(
          10, 13, 4, 
          10)
      }");
  
      print("TEST-4...${driver(
          59, 47, 56, 
          56)
      }");
  
      print("TEST-5...${driver(
          92, 14, 50, 
          50)
      }");
  
      print("TEST-6...${driver(
          49, 62, 65, 
          62)
      }");
  
      print("TEST-7...${driver(
          16, 95, 12, 
          16)
      }");
  
      print("TEST-8...${driver(
          33, 41, 90, 
          41)
      }");
  
      print("TEST-9...${driver(
          66, 63, 46, 
          63)
      }");
  
      return 0;
  }
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;
    }
  }