Maximum area of a Rectangle that can be circumscribed about a given Rectangle of size LxW | Java 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
import java . io . * ; import java . util . * ; class GFG { static double AreaofRectangle ( int L , int W ) { double area = ( W + L ) * ( W + L ) / 2 ; return area ; } public static void main ( String args [ ] ) { int L = 18 ; int W = 12 ; System . out . println ( AreaofRectangle ( L , W ) ) ; } }