Problem 149
Locating the Largest Value in an Array
Write a program that creates an array which can hold ten values.
Fill the array with random numbers from 1 to 100
.
Display the values in the array on the screen.
Then use a linear search to find the largest value in the array,
and display that value and its slot number.
Array: 45 87 39 32 93 86 12 44 75 50 The largest value is 93 It is in slot 4
◄ 148: Finding the Largest Value in an Array 150: Pre-populating Arrays ►
Adapted from ProgrammingByDoing.com
©2013 Graham Mitchell
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.