Q:

Write a JavaScript program to find the area of a triangle where lengths of the three of its sides are 5, 6, 7

0

 Write a JavaScript program to find the area of a triangle where lengths of the three of its sides are 5, 6, 7.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

var side1 = 5; 
var side2 = 6; 
var side3 = 7; 
var s = (side1 + side2 + side3)/2;
var area =  Math.sqrt(s*((s-side1)*(s-side2)*(s-side3)));
console.log(area);

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now