title: Middle Of Three Using Minimum Comparisons 1
signature: fun middleOfThreeUsingMinimumComparisons1(a: Int, b: Int, c: Int): Int {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(a: Int, b: Int, c: Int, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(a, b, c), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(43, 24, 7, 24)
      println("TEST-0...${result}")
      
      result = driver(76, 54, 66, 66)
      println("TEST-1...${result}")
      
      result = driver(57, 5, 40, 40)
      println("TEST-2...${result}")
      
      result = driver(10, 13, 4, 10)
      println("TEST-3...${result}")
      
      result = driver(59, 47, 56, 56)
      println("TEST-4...${result}")
      
      result = driver(92, 14, 50, 50)
      println("TEST-5...${result}")
      
      result = driver(49, 62, 65, 62)
      println("TEST-6...${result}")
      
      result = driver(16, 95, 12, 16)
      println("TEST-7...${result}")
      
      result = driver(33, 41, 90, 41)
      println("TEST-8...${result}")
      
      result = driver(66, 63, 46, 63)
      println("TEST-9...${result}")
      
          
  }
  
  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;
    }
  }