Area of Largest rectangle that can be inscribed in an Ellipse | C ++ Program to find the biggest rectangle which can be inscribed within the ellipse ; Function to find the area of the rectangle ; a and b cannot be negative ; area of the rectangle ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; float rectanglearea ( float a , float b ) { if ( a < 0 b < 0 ) return -1 ; return 2 * a * b ; } int main ( ) { float a = 10 , b = 8 ; cout << rectanglearea ( a , b ) << endl ; return 0 ; }