Maximum area of a Rectangle that can be circumscribed about a given Rectangle of size LxW | C ++ program for the above approach ; Function to find area of rectangle inscribed another rectangle of length L and width W ; Area of rectangle ; Return the area ; Driver Code ; Given dimensions ; Function call
#include <bits/stdc++.h> NEW_LINE using namespace std ; double AreaofRectangle ( int L , int W ) { double area = ( W + L ) * ( W + L ) / 2 ; return area ; } int main ( ) { int L = 18 ; int W = 12 ; cout << AreaofRectangle ( L , W ) ; return 0 ; }