Question: Create a Menu Driven Program [see below] to ask for how many repetitions you want for each LOOP TYPE. Your Menu should be this: Repetition
Create a Menu Driven Program [see below] to ask for how many repetitions you want for each LOOP TYPE.
Your Menu should be this:
Repetition Selection for Looping.
1. While Loop - how many?
2. Do Loop how many?
3. For Loop how many?
4. Quit!
You must use a CASE/SWITCH, WITH A QUIT AND DEFAULT ERROR MESSAGE FOR LOOPING INCORRECT CHOICES.
All Error Message must be relevant and be printed on the screen.
A new Menu must be displayed on the console each time a menu choice is made.
All choices must be tested and printed in the text file.
You should use the Tab command [\t] to center your menu on the console and the to move it down to the center.
Your summary statement will be Case/Switch.
################################################
4. Using ofs, functions, output file only
5. Create each one of the three Loops.
6. Each loop should be in its own function named as follows:
a. whl = while loop
b. doo = Do loop
c. forr = For loop
7. Each Loop type should use a counter, and count to 10 while printing 1 thru 10 in the output file. [on the same line per loop]
8.Each Loop print should have a title for what type of loop is printed
9.Each count print should be on a separate line.
10.All numbers should be aligned with all three print types.
**********PLEASE READ ALL THE INSTRUCTIONS ABOVE AND SHOW ME THE CODE THAT WILL OUTPUT TO A TEXT FILE *************
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
