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
#include <bits/stdc++.h> NEW_LINE using namespace std ; float Area ( float r ) { if ( r < 0 ) return -1 ; float x = ( 2 * r ) / sqrt ( 5 ) ; float A = 0.70477 * pow ( x , 2 ) ; return A ; } int main ( ) { float r = 5 ; cout << Area ( r ) << endl ; return 0 ; }