Biggest Reuleaux Triangle inscirbed within a square inscribed in a semicircle | C # Program to find the biggest Reuleaux triangle inscribed within in a square which in turn is inscribed within a semicircle ; Function to find the biggest reuleaux triangle ; radius cannot be negative ; height of the reuleaux triangle ; area of the reuleaux triangle ; Driver code
using System ; class GFG { static double Area ( double r ) { if ( r < 0 ) return - 1 ; double x = ( 2 * r ) / ( double ) ( Math . Sqrt ( 5 ) ) ; double A = 0.70477 * ( double ) ( Math . Pow ( x , 2 ) ) ; return A ; } public static void Main ( ) { double r = 5 ; Console . WriteLine ( Area ( r ) ) ; } }