From 84a896a8a6312e52d5b3e97364953422a2765daf Mon Sep 17 00:00:00 2001 From: tafaar Date: Tue, 8 Nov 2022 17:49:17 -0800 Subject: added variables --- BlankConsoleLab/BlankConsoleLab.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'BlankConsoleLab/BlankConsoleLab.cpp') diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index fd50cc8..5058631 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -8,8 +8,8 @@ using namespace std; -float tempCelsius; -float tempFahrenheit; +float tempCelsius, windCelsius; +float tempFahrenheit, windFahrenheit; float windSpeed; const float minF = -80.0, maxF = 121.0, minC = -62.0, maxC = 49.5; @@ -51,7 +51,7 @@ bool CheckWindSpeed(float& input) { float CalculateWindChill(float fahrenheit, float speed) { - + 35.74 + (0.6215 * tempFahrenheit) + (pow(windSpeed, 0.16) * ((0.4275 * tempFahrenheit) - 35.75)); } @@ -119,7 +119,7 @@ int main() int colWidth = 20; - float windChill = 35.74 + (0.6215 * tempFahrenheit) + (pow(windSpeed, 0.16) * ((0.4275 * tempFahrenheit) - 35.75)); + float windChill; cout << "\nConversions for " << tempInput << tempSystem << " with wind speed " << windSpeed << "MPH." << endl; -- cgit v1.2.3