Well, as you're clearly using C++, why not just use max_element from <algorithm>? That would appear to me to be the easiest way:Originally posted by criticalerror
What is the easiest way to find the maximum value stored in an array and display it on the screen...
Code:#include <iostream> #include <algorithm> using namespace std; int main() { int myArray[10] = {1,27,99,3,15,28,50,62,0,88}; cout << *max_element(myArray, myArray+10) << endl; }