text: Area of a square inscribed in a circle which is inscribed in a hexagon | Function to find the area of the square ; side of hexagon cannot be negative ; area of the square ; Driver code
code: < ? php function area ( $ a ) { if ( $ a < 0 ) return -1 ; $ area = pow ( ( $ a * sqrt ( 3 ) ) / ( sqrt ( 2 ) ) , 2 ) ; return $ area ; } $ a = 5 ; echo area ( $ a ) . " STRNEWLINE " ; ? >