max element would be the element at ( n - 1 ) th index of array after sorting
int maxEle = arr [ n - 1 ] ; cout << " Sum ▁ = ▁ " << findSum ( minEle , maxEle ) << endl ; cout << " Product ▁ = ▁ " << findProduct ( minEle , maxEle ) ; return 0 ; }