Maximum points of intersections possible among X circles and Y straight lines | Javascript program to implement the above approach ; Number of circles ; Number of straight lines ; Function Call
function maxPointOfIntersection ( x , y ) { let k = y * ( y - 1 ) / 2 ; k = k + x * ( 2 * y + x - 1 ) ; return k ; } let x = 3 ; let y = 4 ; document . write ( maxPointOfIntersection ( x , y ) ) ;