Driver code
var n = 6 ; var a = [ 2 , 4 , 5 , 9 , 1 , 8 ] ; var odd_sum_pairs = count_odd_pair ( n , a ) ; var even_sum_pairs = count_even_pair ( odd_sum_pairs , n ) ; document . write ( " " + even_sum_pairs + " " ) ; document . write ( " " + odd_sum_pairs + " " ) ;