Maximum number of edges that N | C ++ implementation to find the maximum number of edges for triangle free graph ; Function to find the maximum number of edges in a N - vertex graph . ; According to the Mantel 's theorem  the maximum number of edges will be  floor of [(n^2)/4] ; Driver Function
#include <bits/stdc++.h> NEW_LINE using namespace std ; int solve ( int n ) { int ans = ( n * n / 4 ) ; return ans ; } int main ( ) { int n = 10 ; cout << solve ( n ) << endl ; return 0 ; }