Area of a triangle inscribed in a rectangle which is inscribed in an ellipse | C # Program to find the area of the triangle inscribed within the rectangle which in turn is inscribed in an ellipse ; Function to find the area of the triangle ; length of a and b cannot be negative ; area of the triangle ; Driver code
using System ; class GFG { static float area ( float a , float b ) { if ( a < 0 b < 0 ) return - 1 ; float A = a * b ; return A ; } static public void Main ( ) { float a = 5 , b = 2 ; Console . WriteLine ( area ( a , b ) ) ; } }