Question: Using the srand() and rand() C++ library functions, fill an array of 1000 floating-point numbers with random numbers that have been scaled to the range

Using the srand() and rand() C++ library functions, fill an array of 1000 floating-point numbers with random numbers that have been scaled to the range 1 to 100.

Then determine and display the number of random numbers having values between 1 and 50 and the number having values greater than 50.

Then modify it to also count and display the number of values between 1 and 25, 26 and 50, 51 and 75 and 76 to 100.

Provide: 1. Snapshot of program run showing results for values 1 to 50 and 51 to 100. 2. Snapshot of program run showing results for values 1 to 25, 26 to 50, 51 to 75 and 76 to 100.

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!