title: Middle Of Three Using Minimum Comparisons 2
signature: pub fn middle_of_three_using_minimum_comparisons_2(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(
        48, 46, 38, 
        46
      ));
      
      println!("TEST-1...{}", driver(
        93, 34, 11, 
        34
      ));
      
      println!("TEST-2...{}", driver(
        58, 78, 6, 
        58
      ));
      
      println!("TEST-3...{}", 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;
  }