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