Question: write a program in c + + that covers these requirements: Initialize the random number generator using a seed value of 9 . Other seed

write a program in c++ that covers these requirements: Initialize the random number generator using a seed value of 9. Other seed values may be used to
produce different results. However, the version that is handed in for grading MUST use a seed value
of 9.
Generate a random number between 2 and 20. This will be the number of values in the first group.
Display the number of values in the group with an appropriate label.
In a forloop that executes exactly "number of values in the first group" number of times, generate a
random number between 1 and 50, display the random number, and perform the calculations that are
necessary to calculate the statistics.
After the for loop has finished executing, display the four statistics with appropriate labels. Any value
with a decimal point should be displayed with exactly 2 digits after the decimal point. All the statistical
values should be displayed with the last digits lining up.
Now, generate a random number between 2 and 20. This will be the number of values in the second
group. Display the number of values in the group with an appropriate label.
Using a while loop that executes exactly "number of values in the second group" number of times,
generate a random number between 1 and 75, display the random number, and perform the calculations
that are necessary to calculate the statistics.
After the while loop has finished executing, display the four statistics with appropriate labels. Any value
with a decimal point should be displayed with exactly 2 digits after the decimal point. All the statistical
values should be displayed with the last digits lining up.
Finally, generate a random number between 2 and 20. This will be the number of values in the third
group. Display the number of values in the group with an appropriate label.
Using a do while loop that executes exactly "number of values in the third group" number of times,
generate a random number between 1 and 150, display the random number, and perform the calculations
that are necessary to calculate the statistics.
After the do while loop has finished executing, display the four statistics with appropriate labels. Any
value with a decimal point should be displayed with exactly 2 digits after the decimal point. All the
statistical values should be displayed with the last digits lining up.
Symbolic Constants
This program MUST use at least 5 symbolic constants.
The first constant represents the minimum size of the groups of values. It should have an integer value
of 2.
The second constant represents the maximum size of the groups of values. It should have an integer
value of 20.
The third constant represents the maximum possible value for the 1st group of values (the one generated
by the for loop). It should have an integer value of 50.
The fourth constant represents the maximum possible value for the 2nd group of values (the one
generated by the while loop). It should have an integer value of 75.
The fifth constant represents the maximum possible value for the 3rd group of values (the one generated
by the do while loop). It should have an integer value of 150.
More symbolic constants may be added to the code if necessary
Add the standard deviation for each group

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 Programming Questions!