Question: Desk Check function testPyramid) t var pa pyramidSurfaceArea(8, 7); document.getElementById('outputDiv').innerHTML pa; // Computes and returns the surface area of the // four triangular faces of

Desk Check

Desk Check function testPyramid) t var pa pyramidSurfaceArea(8, 7); document.getElementById('outputDiv').innerHTML pa; //

function testPyramid) t var pa pyramidSurfaceArea(8, 7); document.getElementById('outputDiv').innerHTML pa; // Computes and returns the surface area of the // four triangular faces of a regular pyramid // with the specified base length and height. function pyramidSurfaceArea (base, height) f var edge = Math.sqrt(base*base/2 var triArea triangleArea(base, var pyramidArea-4 * triArea; return pyramidArea; + height *height); edge, edge); base height edge triArea ramidArea // Computes and returns the area ofa // triangle with side lengths a, b, and c function triangleArea(a, b, c) 1f var s=(a+b+c)/2; var area Math.sqrt(s * return area; (s-a) (s-b) (s-c)); * * Round all answers for this question to one place after the decimal S C area Check

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!