Problem Description This program is to give the user the option of converting a
ID: 1925326 • Letter: P
Question
Problem DescriptionThis program is to give the user the option of converting a set of temperatures either from Celsius to Fahrenheit (C to F) or vice versa, from Fahrenheit to Celsius (F to C), or to quit the program. If the user selects either C to F or F to C, the program will prompt the user to enter three integer values, a starting temperature, an ending temperature, and an increment. After these values have been entered the program will display a table of equivalent C and F (or F and C) temperatures, from the starting temperature to the ending temperature and incrementing by the increment value each row.
The table must meet all of the following criteria:
Explanation / Answer
#include <iostream>
#include <iomanip>
using namespace std;
int getMenuSelection(char& Tempconversion );
int getstartendandincremet (int& start, int& end, int& increment);
int ctof();
int ftoc();
int displayctoftable (int& start, int& end, int& increment);
int displayftoctable (int& start, int& end, int& increment);
int selection;
int main()
{
while ("keepgoing")
{
cout << "Temperature Conversions " << endl;
cout << "C: Convert form celsius to fahrenheit" << endl;
cout << "F: Convert form Farenheit to Celsius" << endl;
cout << "Q: Quit" << endl;
cout << "Enter your selection:" << endl;
cin >> selection;
cout << "enter Start, End, and Increment on one line separated by spaces: " <<endl;
break;
switch (selection)
{
case 'c':
case 'C':
break;
case 'f':
case 'F':
break;
case 'q':
case 'Q':
break;
default:
break;}
}
cin.ignore(2);
return 0;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.