diff --git a/02-triangleArea/index.js b/02-triangleArea/index.js index 7628fcd..505adc2 100644 --- a/02-triangleArea/index.js +++ b/02-triangleArea/index.js @@ -1,3 +1,3 @@ export function triangleArea(base, height) { - // your code here + return base*height/2 } \ No newline at end of file diff --git a/03-maxValue/index.js b/03-maxValue/index.js index e433b31..6a57400 100644 --- a/03-maxValue/index.js +++ b/03-maxValue/index.js @@ -1,4 +1,16 @@ export function maxValue(values) { // implementar logica aqui - + const Arr = values + let Maior = values[0] + if(Maior === undefined){ + return Maior = 0; + } + else{ + Arr.forEach((atual)=>{ + if(Maior < atual){ + Maior = atual + } + }) + } + return Maior; } \ No newline at end of file