instagram

Generate fibonacci sequence in java

Fibonacci sequence : It is the sum of the two preceding ones

F(n) = F(n-1) + F(n-2)
Here F(0) = 0 and F(1) = 1

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

Share