Maximum area of rectangle possible with given perimeter | C # to find maximum area rectangle ; Function to find max area ; return area ; Driver code
using System ; class GFG { static int maxArea ( float perimeter ) { int length = ( int ) Math . Ceiling ( perimeter / 4 ) ; int breadth = ( int ) Math . Floor ( perimeter / 4 ) ; return length * breadth ; } public static void Main ( ) { float n = 38 ; Console . WriteLine ( " Maximum ▁ Area ▁ = ▁ " + maxArea ( n ) ) ; } }