From 6738f84bbde1c3219e298ac2cef027e330ce8ede Mon Sep 17 00:00:00 2001 From: devartes Date: Sun, 23 Oct 2022 09:29:06 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20adicionando=20solu=C3=A7=C3=A3o=20do=20?= =?UTF-8?q?4=C2=B0=20desafio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 04-fibonnaci/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/04-fibonnaci/index.html b/04-fibonnaci/index.html index 2500754..412d334 100644 --- a/04-fibonnaci/index.html +++ b/04-fibonnaci/index.html @@ -17,7 +17,8 @@ */ function fib(values) { // implementar logica aqui - return 0 + var sqrt5 = Math.sqrt(5); + return Math.round(Math.pow(((1 + sqrt5) / 2), values) / sqrt5); } // Resultados esperados