title: Program To Find Remainder Without Using Modulo Or Operator 2
signature: fun programToFindRemainderWithoutUsingModuloOrOperator2(num: Int, divisor: Int): Int {
source_py: def program_to_find_remainder_without_using_modulo_or_operator_2(num, divisor):
      while (num >= divisor):
          num -= divisor
      return num
source_cpp: int program_to_find_remainder_without_using_modulo_or_operator_2(int num, int divisor) {
    while ( num >= divisor ) num -= divisor;
    return num;
  }
question_info.test_list: [{"idx": 0, "outputs": 5, "inputs": {"num": 70, "divisor": 13}}, {"idx": 1, "outputs": 2, "inputs": {"num": 77, "divisor": 3}}, {"idx": 2, "outputs": 4, "inputs": {"num": 77, "divisor": 73}}, {"idx": 3, "outputs": 34, "inputs": {"num": 88, "divisor": 54}}, {"idx": 4, "outputs": 18, "inputs": {"num": 96, "divisor": 39}}, {"idx": 5, "outputs": 6, "inputs": {"num": 6, "divisor": 10}}, {"idx": 6, "outputs": 79, "inputs": {"num": 79, "divisor": 95}}, {"idx": 7, "outputs": 12, "inputs": {"num": 44, "divisor": 32}}, {"idx": 8, "outputs": 26, "inputs": {"num": 26, "divisor": 86}}, {"idx": 9, "outputs": 82, "inputs": {"num": 82, "divisor": 91}}]
question_info.extension: kts
question_info.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(num: Int, divisor: Int, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(num, divisor), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(70, 13, 5)
      println("TEST-0...${result}")
      
      result = driver(77, 3, 2)
      println("TEST-1...${result}")
      
      result = driver(77, 73, 4)
      println("TEST-2...${result}")
      
      result = driver(88, 54, 34)
      println("TEST-3...${result}")
      
      result = driver(96, 39, 18)
      println("TEST-4...${result}")
      
      result = driver(6, 10, 6)
      println("TEST-5...${result}")
      
      result = driver(79, 95, 79)
      println("TEST-6...${result}")
      
      result = driver(44, 32, 12)
      println("TEST-7...${result}")
      
      result = driver(26, 86, 26)
      println("TEST-8...${result}")
      
      result = driver(82, 91, 82)
      println("TEST-9...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: programToFindRemainderWithoutUsingModuloOrOperator2
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn