text: Maximum number of line intersections formed through intersection of N planes | C ++ implementation of the above pproach ; Function to count maximum number of intersections possible ; Driver Code
code: #include <bits/stdc++.h> NEW_LINE using namespace std ; int countIntersections ( int n ) { return n * ( n - 1 ) / 2 ; } int main ( ) { int n = 3 ; cout << countIntersections ( n ) ; return 0 ; }