text: Area of a square inscribed in a circle which is inscribed in a hexagon | C # Program to find the area of the square inscribed within the circle which in turn 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: using System ; class GFG { static float area ( float a ) { if ( a < 0 ) return - 1 ; float area = ( float ) Math . Pow ( ( a * Math . Sqrt ( 3 ) ) / ( Math . Sqrt ( 2 ) ) , 2 ) ; return area ; } public static void Main ( ) { float a = 5 ; Console . WriteLine ( area ( a ) ) ; } }