title: Program For Factorial Of A Number 2
signature: function programForFactorialOfANumber2($n) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($n, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($n), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        2, 
        2));
      
      printf("TEST-1...%s\n",driver(
        12, 
        479001600));
      
      printf("TEST-2...%s\n",driver(
        11, 
        39916800));
      
  }
  
  main();
  ?>
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 );
  }