title: Program To Find Remainder Without Using Modulo Or Operator 2
signature: program_to_find_remainder_without_using_modulo_or_operator_2 <- function(num, divisor) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(num, divisor, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(num, divisor), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          70L, 13L, 
          5L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          77L, 3L, 
          2L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          77L, 73L, 
          4L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          88L, 54L, 
          34L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          96L, 39L, 
          18L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          6L, 10L, 
          6L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          79L, 95L, 
          79L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          44L, 32L, 
          12L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          26L, 86L, 
          26L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          82L, 91L, 
          82L
      )))
  
  }
  
  main()
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;
  }