0

how can I write the code for the fibonacin and how long the execution takes place

10th Dec 2017, 10:21 PM
Arton A Ajeti
Arton A Ajeti - avatar
2 odpowiedzi
0
how write code plz
15th Dec 2017, 6:51 PM
Arton A Ajeti
Arton A Ajeti - avatar
- 1
Do you mean Fibonacci numbers? If so, the following algorithm can find it. First two numbers are 1 Repeat the following until you have however many you want The next number is equal to the sum of the last two 1: 1 2: 1 3: sum of 1 & 2 or 2 4: sum of 2 & 3 or 3 5: sum of 3 & 4 or 5 6: sum of 4 & 5 or 8
11th Dec 2017, 12:58 AM
John Wells
John Wells - avatar