Having trouble getting the code right for the following problem:
Write the function squareArea
( or square_area ) that finds the area of the red square when you have the length of the circular arc A.
(the arc is 1/4 of the total circumference)
Use π = Math.PI
.
Round to two decimals.
Here's the code I have done:
function squareArea(A){
var radius = ((2 * A) / (Math.PI)),
var squareArea = ((radius * radius).toFixed(2)),
return squareArea;
}
Thanks in advance!