Ad
  • Custom User Avatar

    Lol. I have no idea what that was about. It worked because that if statement always evaluates to true. I probably meant if(end >= start), but that isn't necessary either: the for loop should be good enough without the if statement. So that's a bit of a mystery to me. This code was from many years ago, and I no longer remember what I was thinking.

  • Custom User Avatar

    The instructions on how to calculate the fibonacci sequence are a little unclear. (n - 1) + (n - 2) appears to be some addition and subtraction. The calculation is really fib(n - 1) + fib(n - 2)