challenge-algorithms-Ana-Ca.../02-area-do-triangulo/index.html
Heraldo Ecard Roque Filho ac28a3158f adicionado desafios
2021-08-18 18:00:43 -03:00

30 lines
713 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
/*
Faça um algoritmo para calcular a area de um triangulo
*/
function triangleArea(base, height) {
// implementar logica aqui
return 0
}
// Resultados esperados
console.log(triangleArea(3, 5), 7.5) // 7.5
console.log(triangleArea(5, 5), 12.5) // 12.5
console.log(triangleArea(2, 5), 5) // 5
</script>
</body>
</html>