Help for this page

Select Code to Download


  1. or download this
    my ($f, $fn) = (0, 1);
    ($f, $fn) = ($fn, $f + $fn) for 1 .. 25;
    print $f;
    
  2. or download this
    my $PHI = (1 + sqrt(5)) / 2;
    Fibonnaci(N) = ($PHI ** $N - (1 - $PHI) ** $N) / sqrt(5);
    
  3. or download this
    Fibonnaci(N) = int(0.5 + $PHI ** $N / sqrt(5))