Area of the biggest ellipse inscribed within a rectangle | Java Program to find the biggest rectangle which can be inscribed within the ellipse ; Function to find the area of the rectangle ; The sides cannot be negative ; Area of the ellipse ; Driver code
import java . util . * ; import java . lang . * ; import java . io . * ; class GFG { static float ellipse ( float l , float b ) { if ( l < 0 b < 0 ) return - 1 ; float x = ( float ) ( 3.14 * l * b ) / 4 ; return x ; } public static void main ( String args [ ] ) { float a = 5 , b = 3 ; System . out . println ( ellipse ( a , b ) ) ; } }