challenge-algorithms-v2.0-M.../02-triangleArea/index.js

15 lines
427 B
JavaScript

export function triangleArea(base, height) {
// your code here
var calculaarea = require("Area-triangulo-df");
var base = 0;
var height = 0;
var area = 0;
}
console.log("calcula a area de um triangulo");
base = parseFloat(readline.Question("base: "));
height = parseFloat(readline.Question("height "));
// area = calculaarea(base*height)/2;
area = calculaarea(base, height);
console.log("area do triangulo e;" + area)