diff options
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index e85f9d9..7c08fdd 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -55,7 +55,7 @@ int selectType() } float getTemp(int& select) { - float temp = 0; + float temp = -100; const int minC = -62; const int maxC = 49.5; const int minF = -80; @@ -63,7 +63,7 @@ float getTemp(int& select) if (select == 1) { - while (temp >= minC && temp <= maxC) + while (temp < minC && temp > maxC) { cout << endl << "Enter temperature: "; cin >> temp; @@ -75,7 +75,7 @@ float getTemp(int& select) if (select == 2) { - while (temp >= minF && temp <= maxF) + while (temp < minF && temp > maxF) { cout << endl << "Enter temperature: "; cin >> temp; |