development #11

Merged
SavioCarvalhoMoraes merged 20 commits from development into master 2022-10-30 18:40:05 +00:00
Showing only changes of commit c6ca6f99f0 - Show all commits

View File

@ -1,4 +1,15 @@
export function fibonacci(value) {
// implementar logica aqui
}
let vet = [];
vet.push(0);
vet.push(1);
if (value == 0) {
return vet[0];
} else if (value == 1) {
return vet[1];
} else {
for (let index = 2; index <= value; index++) {
vet[index] = vet[index - 2] + vet[index - 1];
}
}
return vet.at(-1);
}