diff options
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 98 |
1 files changed, 97 insertions, 1 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index ed5f807..8183f7b 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -9,8 +9,104 @@ using std::cout; using std::cin; using std::endl; +float Cel; +float Fah; +char Sel; +float WindChill; +float WindSpeed; + + +//start Menu +void Menu() +{ + cout<< "Welcome to the Menu!!" << endl; +} +void printFunctionCF() +{ + cout << "For " << Fah << " Degrees f and " << WindSpeed << " mph winds the windchill is: " << WindChill << endl; + +} +void printFunctionFC() +{ + cout << "The"; +} +//Celcius to Fahrenheit +int CeltoFar() +{ + cout << "Type your temprature in Celcius: "; + cin >> Cel; + cout << endl; + + cout << "You entered " << Cel << endl; + + Fah = 9 / 5 * Cel + 32; ; + + cout << "which is " << Fah << " degrees fahrenheit" << endl; + + cout << "Type the windspeed in mph " << endl; + cin >> WindSpeed; + + WindChill = 35.74 + .6215 * Fah * pow(WindSpeed, .16) + .4275 * Fah * pow(WindSpeed,.16); + + return WindChill; + return WindSpeed; + return Fah; + + +} + +int FartoCel() +{ + cout << "Type your temprature in Fahrenheit: "; + cin >> Fah; + cout << endl; + + cout << "You entered " << Fah << endl; + + Cel = (Fah - 32) *5/9; + + cout << "which is " << Cel << " degrees Celcius" << endl; + + cout << "Type the windspeed in mph " << endl; + cin >> WindSpeed; + + WindChill = 35.74 + .6215 * Fah * pow(WindSpeed, .16) + .4275 * Fah * pow(WindSpeed, .16); + + return WindChill; + return WindSpeed; + return Cel; +} +int readI() +{ + int choose = 1; + + cout << "Type your selection here: "; + cin >> choose; + return choose; +} +//Driver Program int main() { - cout << "Hello World!\n"; + + cout << "Welcome to the Menu!!" << endl; + + cout << "Cel or Fah" << endl << "Please type C or F: "; + cin >> Sel; + + if (Sel == 'C' || Sel == 'c') + { + CeltoFar(); + } + else if (Sel == 'F' || Sel == 'f') + { + FartoCel(); + } + else + { + cout << "Please try again." << endl << "Remember you can only type C or F: "; + cin >> Sel; + + } + printFunctionCF(); } |