text: Area of triangle formed by the axes of co | C # program area of triangle formed by the axes of co - ordinates and a given straight line ; Function to find area ; Driver code
code: using System ; class GFG { static double area ( double a , double b , double c ) { double d = Math . Abs ( ( c * c ) / ( 2 * a * b ) ) ; return d ; } static public void Main ( ) { double a = - 2 , b = 4 , c = 3 ; Console . WriteLine ( area ( a , b , c ) ) ; } }