Area of triangle formed by the axes of co | Java program area of triangle formed by the axes of co - ordinates and a given straight line ; Function to find area ; Driver code
import java . io . * ; class GFG { static double area ( double a , double b , double c ) { double d = Math . abs ( ( c * c ) / ( 2 * a * b ) ) ; return d ; } public static void main ( String [ ] args ) { double a = - 2 , b = 4 , c = 3 ; System . out . println ( area ( a , b , c ) ) ; } }