diff options
| author | JonCr <[email protected]> | 2022-11-10 23:43:22 -0800 |
|---|---|---|
| committer | JonCr <[email protected]> | 2022-11-10 23:43:22 -0800 |
| commit | e995b032577189ace47284d7f871d5dbd9abec67 (patch) | |
| tree | 5d8236cec0770ce84922d27251f717ec2da75ed4 | |
| parent | Update (diff) | |
| download | cst116-lab2-cognitiveshadow-e995b032577189ace47284d7f871d5dbd9abec67.tar.xz cst116-lab2-cognitiveshadow-e995b032577189ace47284d7f871d5dbd9abec67.zip | |
Fix
| -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 7c08fdd..688f5c7 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -55,7 +55,7 @@ int selectType() } float getTemp(int& select) { - float temp = -100; + 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; |