Area of a square inscribed in a circle which is inscribed in an equilateral triangle | Java Program to find the area of the square inscribed within the circle which in turn is inscribed in an equilateral triangle ; Function to find the area of the square ; a cannot be negative ; area of the square ; Driver code
import java . io . * ; class GFG { static float area ( float a ) { if ( a < 0 ) return - 1 ; float area = ( float ) Math . sqrt ( a ) / 6 ; return area ; } public static void main ( String [ ] args ) { float a = 10 ; System . out . println ( area ( a ) ) ; } }