Question: 12:37 PM Fri Feb 12 79% k 240pgm4.htm ... Basic Program Logic Initialize the random number generator using a seed value of 5. Note: other

 12:37 PM Fri Feb 12 79% k 240pgm4.htm ... Basic ProgramLogic Initialize the random number generator using a seed value of 5.Note: other seed values may be used to produce different results. However,

12:37 PM Fri Feb 12 79% k 240pgm4.htm ... Basic Program Logic Initialize the random number generator using a seed value of 5. Note: 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 5. 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 for loop that executes exactly "number of values in the first group" number of times: generate a random number (no restrictions) display the random number check if the random number is a multiple of 3 and if it is, increment a counter of the number of multiples of 3 check if the random number is a multiple of 7 and if it is, increment a counter of the number of multiples of 7 When displaying the random number, make sure that there are exactly 6 values displayed per line. The exception is the last line, which may have less than 6 values displayer. Next, 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. In a while loop that executes exactly "number of values in the second group" number of times: generate a random number (no restrictions) display the random number check if the random number is a multiple of 3 and if it is, increment a counter of the number of multiples of 3 check if the random number is a multiple of 7 and if it is, increment a counter of the number of multiples of 7 As with the previous group, when displaying the random number, make sure that there are exactly 6 values displayed per line. The exception is the last line, which may have less than 6 values displayer. 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 In a do while loop that executes exactly "number of values in the third group" number of times: 12:38 PM Fri Feb 12 79% ... k 240pgm4.htm In a do while loop that executes exactly "number of values in the third group" number of times: generate a random number (no restrictions) display the random number check if the random number is a multiple of 3 and if it is, increment a counter of the number of multiples of 3 check if the random number is a multiple of 7 and if it is, increment a counter of the number of multiples of 7 As with the previous groups, when displaying the random number, make sure that there are exactly 6 values displayed per line. The exception is the last line, which may have less than 6 values displayer. Note: when writing this program, it is important that the steps that involve the random number generator are executed in the sequence that they're listed above. This is because the random number generator simply generates a sequence of values and if those values are not processed in the same order as above, the results will not match the expected results that are listed in the Output section below. Symbolic Constants This program MUST use at least 3 symbolic constants. Two of the constants should be for the minimum and maximum values for the size of the groups of numbers. The minimum group size is 2. The maximum group size is 20. The other constant is left up to you to determine. Some possibilities are for the number of values displayed per line 6), the value 3 for testing for multiples of 3, the value 7 for testing for multiples of 7, or the seed value for the random number generator (5). More symbolic constants may be added to the code if necessary. Program Requirements 1. Include line documentation. There is no need to document every single line, but logical "chunks" of code should be preceded by a line or two that describes what the "chunk" of code does. This will also be a part of every program that is submitted for the remainder of the semester. 2. To use the random number generator, add #include at the beginning of the program 3. The program MUST use 3 symbolic constants as described above. 12:38 PM Fri Feb 12 79% k 240pgm4.htm 1. Include line documentation. There is no need to document every single line, but logical "chunks" of code should be preceded by a line or two that describes what the "chunk" of code does. This will also be a part of every program that is submitted for the remainder of the semester. 2. To use the random number generator, add #include at the beginning of the program 3. The program MUST use 3 symbolic constants as described above. 4. Make sure that the copy of the program that is handed in uses srand(5); to set the seed value for the random number generator. 5. The numbers in each group MUST be displayed in columns with the LAST digit of the values lined up. 6. Hand in a copy of the source code (the CPP file) using Blackboard. Output Run 1 (using srand(5);) on Windows PC There are 18 values in group 1 28693 12255 17649 27472 17476 426 24449 32640 4307 27660 5114 11963 31430 28321 20107 23927 13533 12150 There are 7 multiples of 3 in the group. There are 3 multiples of 7 in the group. There are 17 values in group 2 12517 10992 19083 4959 16110 4352 31193 26922 7253 28211 3131 14615 25936 17451 1122 23849 7969 There are 7 multiples of 3 in the group. There are 3 multiples of 7 in the group. There are 4 values in group 3 2583 13234 25386 26006 There are 2 multiples of 3 in the group. There are 1 multiples of 7 in the 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 Databases Questions!