Question: Program Purpose Complete the code for this menu which will allow the user to select a program to run. The programs are the program that

Program Purpose
Complete the code for this menu which will allow the user to select a program to
run. The programs are the program that have been assigned in this course.
In next week's project you will be inserting the code from those programs into this
program which will be a portfolio of the work you complete in this course.
This program demonstrates various repetition coding structures: "for", "while", "do
while", and the "break" and "continue" statements.
*/
#include // for rand function (random number generator)
#include // for file input and output
#include // for cin and cout
#include // for manipulators such as setw
#include // for using string data types
#include // for time() function
using namespace std;
//comments about each data type defined, either a separate line or at the end of a
line
int main()
{
int choice =0; // Initialize user choice to force "while" loop to execute
to get user's menu choice
char tempChar ='';
do
{
// Display your menu of programs using a few cout statements (use a number and
name for each)
// use a filler character for the three headings (name, menu title, and
semester) and set the width to 25 for each
// If you are using Windows you can do a system call to change the screen
background and foreground colors
// To learn about the Windows "color" command you can type "color /?" or "help
color" at a Windows command prompt
// To open a Windows command prompt type "cmd" from the Windows program/search
bar
system("color 02");
cout <<" CS 11 MENU SPRING 2023"<< endl << endl <<
endl;
//Display the '=' character 75 times below the menu title
// Display the list of programs assigned so far this semester
cout <<"1 Project 2.1-Fahrenheit to Celsius Converter" << endl;
cout <<"2) Project 2:"<< endl;
cout <<"3) Project 3:"<< endl;
// Display an option 99) to end the program
cout << endl << endl << "Enter a menu option -->";
cin >> choice;
switch (choice)
// Be sure to use a "break" statement after the statements that execute for
each "case" statement
{
case 1:
// Repeat this code below for each "case" statement corresponding to
each program name in your menu above
cin.clear();
system("cls");
cout <<"*************************************************"<< endl;
cout <<"****"<< endl;
cout <<"** Project 2.1-Fahrenheit to Celsius Converter **"<< endl;
cout <<"****"<< endl;
cout <<"*************************************************"<< endl <<
endl;
// Force user to type 'R'(use a "while" loop to force the user to enter
a valid choice before continuing
// while ()
{
cout << "Type [R] to return to menu -->"<< endl;
cin >> tempChar;
}
system("cls");
break;
// finish coding the switch statement case statements,one for each menu
option. Include the option 99 to end the program and the default case
// Include code in each case to prompt user to enter any key to continue
and then clear the screen with system("cls") if you are using Windows
case 99:
break;
}// end switch
} while (choice !=99);
return 0;
}

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!