feature/algoritmos #1

Merged
WellingtonDuarteSantos merged 10 commits from feature/algoritmos into master 2022-11-01 12:40:20 +00:00
Showing only changes of commit fe7512aaff - Show all commits

View File

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