Area of the biggest ellipse inscribed within a rectangle | Function to find the area of the rectangle ; The sides cannot be negative ; Area of the ellipse ; Driver code
function ellipse ( l , b ) { if ( l < 0 b < 0 ) return - 1 ; var x = ( 3.14 * l * b ) / 4 ; return x ; } var a = 5 , b = 3 ; document . write ( ellipse ( a , b ) ) ;