Final answer:
The pseudorandom number generator is used to generate three random table sizes in the given range. The number of people not at a table can be calculated by subtracting the sum of the three random table sizes from the total number of people (138).
Step-by-step explanation:
To generate random table sizes, we can use the pseudorandom number generator with the given seedVal. We can set the range of table sizes from lowestGroup to highestGroup inclusive. Here is the step-by-step process:
- Seed the pseudorandom number generator with seedVal.
- Generate the first random table size using the formula: table1 = lowestGroup + (rand() % (highestGroup - lowestGroup + 1)).
- Generate the second random table size using the same formula.
- Generate the third random table size using the same formula.
- Output the three random table sizes, each on a new line.
- To calculate the number of people not at a table, subtract the sum of the three random table sizes from the total number of people (138).
- Output the number of people not at a table.
Learn more about generating random table sizes and calculating the number of people not at a table here: