feature/algoritmos #1

Merged
FilipeQuintanilha merged 10 commits from feature/algoritmos into master 2022-10-28 16:03:10 +00:00
Showing only changes of commit 33485e66ff - Show all commits

View File

@ -1,4 +1,11 @@
export function fibonacci(value) {
// implementar logica aqui
let a = 0, b = 1, c = value;
for (let i = 2; i <= value; i++) {
c = a + b;
a = b;
b = c;
}
return c;
}