The biggest possible circle that can be inscribed in a rectangle | C ++ Program to find the biggest circle which can be inscribed within the rectangle ; Function to find the area of the biggest circle ; the length and breadth cannot be negative ; area of the circle ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; float circlearea ( float l , float b ) { if ( l < 0 b < 0 ) return -1 ; if ( l < b ) return 3.14 * pow ( l / 2 , 2 ) ; else return 3.14 * pow ( b / 2 , 2 ) ; } int main ( ) { float l = 4 , b = 8 ; cout << circlearea ( l , b ) << endl ; return 0 ; }