Help for this page

Select Code to Download


  1. or download this
    
    sub factorial
    ...
      return 1 if ( $i <= 0 );
      return $i * factorial( $i-1 );
    }
    
  2. or download this
    factorial 0 : 1;
    factorial i : i * factorial( i - 1 );