title: Program To Find Remainder Without Using Modulo Or Operator
signature: pub fn program_to_find_remainder_without_using_modulo_or_operator(num: i32, divisor: i32) -> i32 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: i32, expected: i32)->bool{
  return actual==expected
  }
  pub fn driver(num: i32, divisor: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(num, divisor), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        80, 54, 
        26
      ));
      
      println!("TEST-1...{}", driver(
        63, 21, 
        0
      ));
      
      println!("TEST-2...{}", driver(
        1, 56, 
        1
      ));
      
      println!("TEST-3...{}", driver(
        22, 39, 
        22
      ));
      
      println!("TEST-4...{}", driver(
        66, 7, 
        3
      ));
      
      println!("TEST-5...{}", driver(
        61, 67, 
        61
      ));
      
      println!("TEST-6...{}", driver(
        45, 63, 
        45
      ));
      
      println!("TEST-7...{}", driver(
        29, 44, 
        29
      ));
      
      println!("TEST-8...{}", driver(
        95, 65, 
        30
      ));
      
      println!("TEST-9...{}", driver(
        9, 68, 
        9
      ));
      
  }
source_py: def program_to_find_remainder_without_using_modulo_or_operator(num, divisor):
      return (num - (divisor * (num // divisor)))
source_cpp: int program_to_find_remainder_without_using_modulo_or_operator(int num, int divisor) {
    return ( num - divisor * ( num / divisor ) );
  }