Driver Code
int main ( ) { int price [ ] = { 2 , 30 , 15 , 10 , 8 , 25 , 80 } ; int n = sizeof ( price ) / sizeof ( price [ 0 ] ) ; cout << " Maximum ▁ Profit ▁ = ▁ " << maxProfit ( price , n ) ; return 0 ; }