‹header›
‹date/time›
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
‹footer›
‹#›
Note that the array is created and the array is loaded each and every time the user clicks on the Who Won button.  See example 2 for an improvement where the array is only loaded once.
Note the size of the array may change after the array is created, but not the data type.
Notice that the function call is written Sum(score), not Sum(score()), and that the parameter declaration is written ByVal s() As Integer, not ByVal s As Integer.
An efficient alternative to the sequential search is the binary search, which is considered in Section 7.4.