summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
author[email protected] <[email protected]>2022-11-09 14:34:04 -0800
committer[email protected] <[email protected]>2022-11-09 14:34:04 -0800
commit6318978c9d83567cb4e803b81fb3b507b173bd8c (patch)
tree7a9f9c1327e6ed320e1ed659567ef0b8e2abae67 /BlankConsoleLab/BlankConsoleLab.cpp
parentInitial Inputs (diff)
downloadcst116-lab2-smith-benjamin-6318978c9d83567cb4e803b81fb3b507b173bd8c.tar.xz
cst116-lab2-smith-benjamin-6318978c9d83567cb4e803b81fb3b507b173bd8c.zip
More Stuff has been Done
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp14
1 files changed, 11 insertions, 3 deletions
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