ENGINEERING H192 DAILY ASSIGNMENT A09 As you’ve seen, the switch statement can be used to implement menu-like transfers. In addition, the switch selection structure in C/C++ can be used as a convenient way to count the occurrences of integral data values. In this assignment you are to write a complete C/C++ program, a09.cpp , that uses a while loop, a for loop, and a switch structure to generate and count a user specified number of random integers between 0 and 9 inclusive. The while loop will control the overall execution of the program, the for loop will be “nested” inside the while loop and will be used to generate and count the random integers, while the switch structure , which will be nested inside the for loop, will do the actual counting. Your program must: (1) Execute indefinitely until the users decides to quit (2) Prompt the user for the number of random integers to generate, with “0” indicating “quit” (3) Inform the user when an entry is invalid (less than zero) and ignore that entry
This is the end of the preview.
access the rest of the document.
Random Number Generator, random integers, switch selection structure