diff options
| author | [email protected] <[email protected]> | 2022-11-09 15:22:52 -0800 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2022-11-09 15:22:52 -0800 |
| commit | 1e969b823535b0e416be9e2a389a1aafd7392a57 (patch) | |
| tree | 700ce652c286e791a342769a246e4e16be864052 | |
| parent | FUNCTIONS (diff) | |
| download | cst116-lab2-smith-benjamin-1e969b823535b0e416be9e2a389a1aafd7392a57.tar.xz cst116-lab2-smith-benjamin-1e969b823535b0e416be9e2a389a1aafd7392a57.zip | |
I think I might be done, but I can never be too sure
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 9 |
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 |