// BlankConsoleLab.cpp : This file contains the 'main' function. Program execution begins and ends there. /* * Benjamin Smith * CST116 Lab 2 */ #include using namespace std; string input = ""; float temperature = 0; int main() { cout << "Before you input a temperature value, you must first determine if it's in fahrenheit or celcius." << endl; cout << "Please input 'F' for fahrenheit or 'C' for celcius: "; cin >> input; while (input != "F" && input != "C") { cout << "That input is invalid." << endl; cout << "Make sure your input is capitalized." << endl; cout << "Please input 'F' for fahrenheit or 'C' for celcius: "; cin >> input; } cout << endl << endl << "Now please input the temperature: "; cin >> temperature; if (input == "C") { temperature *= 1.8; temperature += 32; } }