title: Program For Factorial Of A Number 2
signature: pub fn program_for_factorial_of_a_number_2(n: 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(n: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        2, 
        2
      ));
      
      println!("TEST-1...{}", driver(
        12, 
        479001600
      ));
      
      println!("TEST-2...{}", driver(
        11, 
        39916800
      ));
      
  }
source_py: def program_for_factorial_of_a_number_2(n):
      return (1 if ((n == 1) or (n == 0)) else (n * program_for_factorial_of_a_number_2((n - 1))))
source_cpp: int program_for_factorial_of_a_number_2(int n) {
    return ( n == 1 || n == 0 ) ? 1 : n * program_for_factorial_of_a_number_2 ( n - 1 );
  }