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 ; 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 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 programsearch
bar
systemcolor ;
cout CS MENU SPRING endl endl
endl;
Display the character times below the menu title
Display the list of programs assigned so far this semester
cout Project Fahrenheit to Celsius Converter" endl;
cout Project : endl;
cout Project : endl;
Display an option 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 :
Repeat this code below for each "case" statement corresponding to
each program name in your menu above
cin.clear;
systemcls;
cout endl;
cout endl;
cout Project Fahrenheit to Celsius Converter endl;
cout endl;
cout endl
endl;
Force user to type Ruse 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;
systemcls;
break;
finish coding the switch statement case statements,one for each menu
option. Include the option 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 systemcls if you are using Windows
case :
break;
end switch
while choice ;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
