Fibanocci | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Fibanocci

Can someone explain me how fibanocci works!?

20th May 2021, 6:33 AM
Aileni Akshay
Aileni Akshay - avatar
7 Answers
20th May 2021, 6:34 AM
Genuine Stalwart
Genuine Stalwart - avatar
+ 4
It starts from 0 and 1 Then it sums up the 2 subsequent numbers. Ex- 0,1 0+1=1 1+1=2 2+1=3 3+2=5 5+3=8 8+5=13...
20th May 2021, 6:35 AM
Atul [Inactive]
20th May 2021, 6:36 AM
Atul [Inactive]
+ 2
Fibonacci goes smthg like this, The first 2 nums are fixed which are 0 and 1 The whole sequence is formed using these two.. The ith number gets generated using the sum of previous 2 numbers. So, as 0 and 1 are fixed the third number will be 0+1 which is 1 again. The fourth number will be 1+1 (sum of 2nd and 3rd element which are the previous 2 nums of fourth number) which is 2. Fifth number will be 1+2 which is 3. Sixth will be 2+3, which is 5. So on.... This is the process to generate a fibonacci sequence.
20th May 2021, 6:49 AM
sarada lakshmi
sarada lakshmi - avatar
+ 1
22nd May 2021, 4:15 AM
Deyzze
Deyzze - avatar
0
I can find it in google, but I need in a clean and pure way btw thanks :)
20th May 2021, 6:35 AM
Aileni Akshay
Aileni Akshay - avatar
0
Helpful :)
20th May 2021, 6:55 AM
Aileni Akshay
Aileni Akshay - avatar