Program to find total number of edges in a Complete Graph | Function to find the total number of edges in a complete graph with N vertices ; Driver Code
< ? php function totEdge ( $ n ) { $ result = 0 ; $ result = ( $ n * ( $ n - 1 ) ) / 2 ; return $ result ; } $ n = 6 ; echo totEdge ( $ n ) ; ? >