summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index 10944bc..11315de 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -19,6 +19,10 @@ float Temp_Conversion(float temp) {
temp += 32;
return temp;
}
+void Temp_Speed_Output(float& temp, float& speed) {
+ cout << endl << endl << endl << "The temperature in fahrenheit is " << temp << " degrees." << endl;
+ cout << "The wind speed is " << speed << "mph." << endl;
+}
float Wind_Chill(float temp, float speed) {
return 35.74 + (.6215 * temp) - (35.75 * pow(speed, .16)) + (.4275 * temp * pow(speed, .16));
}
@@ -73,8 +77,11 @@ int main()
if (input == "C")
Temp_Conversion(temperature);
+ //Output of Temperature and Wind Speed
+ Temp_Speed_Output(temperature, wind_speed);
+
//Calculate the Wind Chill
wind_chill = Wind_Chill(temperature, wind_speed);
- cout << endl << endl << endl << wind_chill;
+ cout << "The wind chill is " << wind_chill << endl;
} \ No newline at end of file