feature/algoritmo #1

Merged
PatrickReisSantos merged 10 commits from feature/algoritmo into master 2022-11-02 16:06:18 +00:00
2 changed files with 15 additions and 5 deletions
Showing only changes of commit 176d485260 - Show all commits

View File

@ -1,4 +1,8 @@
export function sum(values) { export function sum(values) {
// implementar logica aqui let soma = 0;
for (let i = 0; i < values.length; i++) {
soma += values[i];
}
return soma;
// implementar logica aqui
} }

View File

@ -1,4 +1,10 @@
export function sumEven(value) { export function sumEven(value) {
// implementar logica aqui let soma = 0;
for (let i = 0; i <= value.length; i++) {
if (value[i] % 2 === 0) {
soma += value[i];
}
}
return soma;
// implementar logica aqui if (variavel % 2 !== 0)
} }