I\'m doing a task in a subject were fib(0) is defined to = 1. But that can\'t be right? fib(0) is 0?
Program with fib(0) = 1; spits out fib(4) = 5
Program w
Fibonacci series doesn't start with 0. It starts with 1.
We are getting confused trying to represent a mathematical concept as a computer program. The term "Fib(0)" is the array index that holds the first Fibonacci number which is always 1.
We are asking this question because we have to return something from the program when someone enters 0 as input. What that input essentially means is to generate 0 Fibonacci numbers. So you return a message saying "No Fibonacci numbers generated"