Help for this page

Select Code to Download


  1. or download this
    #! perl -slw
    use strict;
    ...
        return $n if $n < 2;
        return fib_t2( $n -2 ) + fib_t2( $n -1 );
    }
    
  2. or download this
    #! perl -slw
    use strict;
    ...
        return $n if $n < 2;
        return fib_t2( $n -2 ) + fib_t2( $n -1 );
    }
    
  3. or download this
    sub fibonacci :future {
        my $n = shift;
        return $n if $n < 2;
        return fibonacci( $n -2 ) + fibonacci( $n -1 );
    }