From 8d22c5d2b41a044731632453def6f26f6a8e5c1c Mon Sep 17 00:00:00 2001 From: Evan Date: Wed, 9 Nov 2022 22:52:57 -0800 Subject: g --- BlankConsoleLab/BlankConsoleLab.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'BlankConsoleLab/BlankConsoleLab.cpp') 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?"<> choice; if (choice == 'n') { -- cgit v1.2.3