+ 6
👉👉👉Challenge👈👈👈 (Fibonacci numbers)
Given the position of the Fibonacci number, make a function(can be recursive) and calculate the number. here is the series: 1 1 2 3 5 8 13... Example: Input: 6 output: 8 Have fun. If you like this challenge tell your friends and give an upvote.
14 Answers
+ 32
here we go ,
https://code.sololearn.com/c6ErdwUmKLPK/?ref=app
+ 34
thnks 4 marking my answer best ... yeah ☺
+ 14
https://code.sololearn.com/caP8649IZ2fH/?ref=app
it can calculate up to 141th number
+ 9
Here's mine :
https://code.sololearn.com/cWhnd0iDNlM5/?ref=app
+ 5
(javascript)
var fibonacci = function(n){
return Math.round(Math.pow((1+Math.sqrt(5))/2,n)/Math.sqrt(5));
}
+ 4
Technically that's not recursive, just using a for loop and an array. 😉
+ 4
https://code.sololearn.com/c5tk30L15s4w/?ref=app
+ 3
i sort of used that too. I used recursive functions 🤗
+ 3
@ Gaurav Agrawal
you're welcome 😋
0
https://code.sololearn.com/cFSrGw3QKTa1/?ref=app