Maximum Primes whose sum is equal to given N | Function to find max count of primes ; if n is even n / 2 is required answer if n is odd floor ( n / 2 ) = ( int ) ( n / 2 ) is required answer ; Driver Code
function maxPrimes ( n ) { return parseInt ( n / 2 ) ; } var n = 17 ; document . write ( maxPrimes ( n ) ) ;