comitando trangleArea

This commit is contained in:
Moises Antonio Hernandez Ferrer Gonçalves 2022-11-02 12:33:40 -03:00
parent 4b953728a9
commit da8f23078e

View File

@ -1,15 +1,14 @@
export function triangleArea(base, height) {
export function triangleArea(base, height, area) {
// your code here
var calculaarea = require("Area-triangulo-df");
var base = 0;
var height = 0;
var area = 0;
Double b,h,a;
//coletando valores do usuário
System.out.println("Informe o valor de B = base: ");
B = input.nextDouble();
System.out.println("Informe o valor de h = altura: ");
h = input.nextDouble();
//calculando
A = (B*h)/2;
System.out.println("O valor dado é B: "+B+" h: "+h);
System.out.println("A área do triângulo é: "+A);
input.close();
}
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);