Question: Write a program to investigate a set of 15 random numbers. Declare variables. Seed the random number generator with the time of day. Initialize the

 Write a program to investigate a set of 15 random numbers.

Write a program to investigate a set of 15 random numbers. Declare variables. Seed the random number generator with the time of day. Initialize the variables for maximum, minimum, and count. On each pass through a for loop: Generate a random integer between -50 and 50 and print it. See notes on random numbers under files in Canvas. Check to see if it is larger than the maximum. If so assign as new maximum. Check to see if it is smaller than the minimum. If so, assign as new minimum. Check to see if it is negative. If so add to the count of negatives. Upon exiting, print maximum, minimum, and count of negative numbers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!