summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
author[email protected] <[email protected]>2022-11-09 15:26:49 -0800
committer[email protected] <[email protected]>2022-11-09 15:26:49 -0800
commitf030118ef3f17d860dff47e55c2401c37039dd06 (patch)
tree4716985f3a9bbccbe522cbc404db9adf88aa8229 /BlankConsoleLab/BlankConsoleLab.cpp
parentI think I might be done, but I can never be too sure (diff)
downloadcst116-lab2-smith-benjamin-f030118ef3f17d860dff47e55c2401c37039dd06.tar.xz
cst116-lab2-smith-benjamin-f030118ef3f17d860dff47e55c2401c37039dd06.zip
FINAL PUSH
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index 11315de..8f7b61f 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -14,7 +14,7 @@ const float temp_min_F = -80, temp_max_F = 121, temp_min_C = -61, temp_max_C = 4
string input = "";
float temperature = 0, wind_speed = 0, wind_chill = 0;;
-float Temp_Conversion(float temp) {
+float Temp_Conversion(float& temp) {
temp *= 1.8;
temp += 32;
return temp;
@@ -34,6 +34,7 @@ int main()
cout << "Please input 'F' for fahrenheit or 'C' for celsius: ";
cin >> input;
while (input != "F" && input != "C") {
+ cout << endl;
cout << "That input is invalid." << endl;
cout << "Make sure your input is capitalized." << endl;
cout << "Please input 'F' for fahrenheit or 'C' for celsius: ";
@@ -83,5 +84,5 @@ int main()
//Calculate the Wind Chill
wind_chill = Wind_Chill(temperature, wind_speed);
- cout << "The wind chill is " << wind_chill << endl;
+ cout << "The wind chill is " << wind_chill<< "." << endl;
} \ No newline at end of file