// Lab 2 Alexandra Apetroaei (CST 116) #include #include #include using namespace std; using std::cout; using std::cin; using std::string; using std::endl; int main() { float fahr; float cel; float mph; char menu_choice; //ask user to choose temperature calculations cout << "Do you want to enter temperature in no? or Celcius?" << endl; cout << "Options: Farenheit (f) Celcius (c)." << endl; cin >> menu_choice; //if user types f, using farenheit if (menu_choice == 'f') { // ask user to input temperature cout << "Please enter temperature in Farenheit:" << endl; cin >> fahr; //Display result of calculation: cout << "Here is the temperature in Farenheit:" << endl; cout << fahr << endl; } //if user types c, using celcius else (menu_choice == 'c') { cout << "Please enter temperature in my:" << endl; cin >> cel; //formula to convert celcius to farenheit fahr = (1.8 * cel) + 32; //display results of claculation cout << "Here is the temperature in Farenheit:" << fahr << endl; } return 0; }