Question: What is the area of a quadrilateral with sides equal to 18, 22, 39, and 41 respectively?
Answer: 798
console.log("********************************");
function Brahmagupta(a,b,c,d){
var perimeter=a+b+c+d;
var s = perimeter/2;
return Math.sqrt((s-a)*(s-b)*(s-c)*(s-d));
}
console.log(Brahmagupta(18,22,39,41));
No comments:
Post a Comment