c++ max of array

C++
cout << " max element is: " << *max_element(array , array + n) << endl;
Source

Also in C++: