Jun 112012
 

By definition first 2 Fibonacci numbers are defined as 0 and 1. nth Fibonacci number can be computed as sum of (n-2)th & (n-1)th Fibonacci numbers

Hence the Fibonacci numbers are as follows:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...

A number is given to you, how will you check if that number is a Fibonacci number or not ? Continue reading »