From 6318978c9d83567cb4e803b81fb3b507b173bd8c Mon Sep 17 00:00:00 2001 From: "smithbenjamin2022@gmail.com" Date: Wed, 9 Nov 2022 14:34:04 -0800 Subject: More Stuff has been Done --- BlankConsoleLab/BlankConsoleLab.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'BlankConsoleLab/BlankConsoleLab.cpp') diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index eee0f79..781c362 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -13,13 +13,21 @@ float temperature = 0; int main() { - cout << "Before you input a temperature value, you must first determine if it's in fahrendheit or celcius." << endl; - cout << "Please input 'F' for fahrendheit or 'C' for celcius: "; + 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 fahrendheit or 'C' for celcius: "; + 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; + } } \ No newline at end of file -- cgit v1.2.3