diff --git a/04-fibonacci/index.js b/04-fibonacci/index.js index 37c64cc..be20017 100644 --- a/04-fibonacci/index.js +++ b/04-fibonacci/index.js @@ -1,4 +1,7 @@ export function fibonacci(value) { // implementar logica aqui - + let phi = (1 + Math.sqrt(5))/2; + let asymp = Math.pow(phi, value) / Math.sqrt(5); + + return Math.round(asymp); } \ No newline at end of file