feat: Adiciona o código do desafio 4

This commit is contained in:
Gabriel Gomes Fernandes 2022-10-31 13:50:56 -03:00
parent eff82acf6d
commit a847d93559

View File

@ -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);
}