diff options
| author | Anibal LopezBonilla <[email protected]> | 2022-11-07 21:03:36 -0800 |
|---|---|---|
| committer | Anibal LopezBonilla <[email protected]> | 2022-11-07 21:03:36 -0800 |
| commit | f1e660b05bbff676e4f9c4474abdd1140e3f308c (patch) | |
| tree | d73af9910a9a3731918fbb195c20baa2aa4e4bfd | |
| parent | Push 3 (diff) | |
| download | cst116-lab2-lopez-bonilla-f1e660b05bbff676e4f9c4474abdd1140e3f308c.tar.xz cst116-lab2-lopez-bonilla-f1e660b05bbff676e4f9c4474abdd1140e3f308c.zip | |
Push 4
| -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; |