title: Program To Find Remainder Without Using Modulo Or Operator 2
signature: def programToFindRemainderWithoutUsingModuloOrOperator2(num: Int, divisor: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(num: Int, divisor: Int, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(num, divisor),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        70, 13, 
        5    
      )}")   
  
  
      println(s"TEST-1...${driver(
        77, 3, 
        2    
      )}")   
  
  
      println(s"TEST-2...${driver(
        77, 73, 
        4    
      )}")   
  
  
      println(s"TEST-3...${driver(
        88, 54, 
        34    
      )}")   
  
  
      println(s"TEST-4...${driver(
        96, 39, 
        18    
      )}")   
  
  
      println(s"TEST-5...${driver(
        6, 10, 
        6    
      )}")   
  
  
      println(s"TEST-6...${driver(
        79, 95, 
        79    
      )}")   
  
  
      println(s"TEST-7...${driver(
        44, 32, 
        12    
      )}")   
  
  
      println(s"TEST-8...${driver(
        26, 86, 
        26    
      )}")   
  
  
      println(s"TEST-9...${driver(
        82, 91, 
        82    
      )}")   
  
  }
  
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;
  }