diff options
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 01b9755..47e24c5 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -16,23 +16,25 @@ float WindChill; float WindSpeed; -//start Menu -void Menu() +void welcomeMessage() { + //Welcome Message cout<< "Welcome to the Menu!!" << endl; } void printFunctionCF() { + //Print Functionn for Celcius to Fahrenheit cout << "For " << Fah << " Degrees f and " << WindSpeed << " mph winds the windchill is: " << WindChill << endl; } void printFunctionFC() { - cout << "The"; + cout << "For " << Cel << " Degrees c and " << WindSpeed << " mph winds the windchill is: " << WindChill << endl; } //Celcius to Fahrenheit int CeltoFar() { + cout << "Type your temprature in Celcius: "; cin >> Cel; cout << endl; @@ -46,7 +48,7 @@ int CeltoFar() cout << "Type the windspeed in mph " << endl; cin >> WindSpeed; - WindChill = 35.74 + .6215 * Fah * pow(WindSpeed, .16) + .4275 * Fah * pow(WindSpeed,.16); + WindChill = 35.74 + .6215 * Fah - 35.75 * pow(WindSpeed, .16) + .4275 * Fah * pow(WindSpeed,.16); return WindChill; return WindSpeed; @@ -57,6 +59,8 @@ int CeltoFar() int FahtoCel() { + + //Fahrenheit to Celcius cout << "Type your temprature in Fahrenheit: "; cin >> Fah; cout << endl; @@ -70,7 +74,7 @@ int FahtoCel() cout << "Type the windspeed in mph " << endl; cin >> WindSpeed; - WindChill = 35.74 + .6215 * Fah * pow(WindSpeed, .16) + .4275 * Fah * pow(WindSpeed, .16); + WindChill = 35.74 + .6215 * Cel -35.75 * pow(WindSpeed, .16) + .4275 * Cel * pow(WindSpeed, .16); return WindChill; return WindSpeed; @@ -80,7 +84,7 @@ int FahtoCel() int main() { - Menu(); + welcomeMessage(); cout << "Cel or Fah" << endl << "Please type C or F: "; cin >> Sel; |