Driver program
int main ( ) { int arr [ ] = { 8 , 2 , 3 , 5 , 7 , 9 , 10 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; cout << " Maximum ▁ sum ▁ = ▁ " << maxAlternateSum ( arr , n ) << endl ; return 0 ; }