Finding the Smallest Value
Rewrite the program given in Example 5-11 to find the smallest value instead of the largest. Generate random numbers between -50 and 50 instead of 0-100. Hint: You will not be able to use the default initialization ofsmallto 0. Instead, initialize it by generating your first random number outside the loop.
Example 5-11
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here