Driver code
int main ( ) { int arr [ ] = { 6 , 1 , 7 , 2 , 8 , 4 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; int b [ 2 ] ; int tranFee = 2 ; max_profit ( arr , b , n , tranFee ) ; cout << b [ 0 ] << " , ▁ " << b [ 1 ] << endl ; return 0 ; }