diff options
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 9a870a3..98047d5 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -10,9 +10,7 @@ char y; char n; int fahrenheit(int t); -int windchill(); - - +//changes celsius to farenheit int fahrenheit(int t) { int f{}; @@ -26,7 +24,7 @@ int fahrenheit(int t) int main() { float t{}; - float f{}; + int f{}; float w{}; float wc{}; char choice{}; @@ -36,19 +34,15 @@ int main() cin >> t; //makes sure temp is between -80 and 121 - while (t < -80 || t > 121) + if (t < -80 || t > 121) { cout << "Input invalid, please enter a number between -80 and 121" << endl; cin.ignore(99, '\n'); return t; } + - cout << f << endl; - - - - - cout << "type y or n" << " is the tempterature in fahrenheit?"; + cout << "type y or n" << " is the tempterature in fahrenheit?"<<endl; // cin >> choice; if (choice == 'n') { |