title: Middle Of Three Using Minimum Comparisons
signature: pub fn middle_of_three_using_minimum_comparisons(a: i32, b: i32, c: i32) -> i32 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: i32, expected: i32)->bool{
  return actual==expected
  }
  pub fn driver(a: i32, b: i32, c: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(a, b, c), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        56, 5, 82, 
        56
      ));
      
      println!("TEST-1...{}", driver(
        56, 60, 17, 
        56
      ));
      
      println!("TEST-2...{}", driver(
        36, 56, 51, 
        51
      ));
      
      println!("TEST-3...{}", driver(
        71, 54, 6, 
        54
      ));
      
      println!("TEST-4...{}", driver(
        3, 70, 81, 
        70
      ));
      
      println!("TEST-5...{}", driver(
        84, 57, 47, 
        57
      ));
      
      println!("TEST-6...{}", driver(
        30, 80, 85, 
        80
      ));
      
      println!("TEST-7...{}", driver(
        82, 54, 32, 
        54
      ));
      
      println!("TEST-8...{}", driver(
        90, 70, 55, 
        70
      ));
      
      println!("TEST-9...{}", 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;
  }