When all of the elements have been processed ...

When all of the array elements in Listing 7 have been examined and processed in this manner, the variable named max will contain the maximum value of all the values stored in the array.

This value is returned by the function.

For the specific set of user input values shown in Figure 1, the maximum value was 99.