title: Program To Find Remainder Without Using Modulo Or Operator 2
signature: class Solution {
  
      public Integer programToFindRemainderWithoutUsingModuloOrOperator2(Integer num, Integer divisor) {
test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer num, Integer divisor, Integer expected){
          try{
              Driver driver = new Driver();
              if (driver.run(num, divisor,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(70, 13, 5);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(77, 3, 2);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(77, 73, 4);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(88, 54, 34);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(96, 39, 18);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(6, 10, 6);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(79, 95, 79);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(44, 32, 12);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(26, 86, 26);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(82, 91, 82);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer num, Integer divisor, Integer expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(num, divisor),expected);
      }
      
      public boolean validateSolution(Integer actual, Integer expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
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;
  }