From e995b032577189ace47284d7f871d5dbd9abec67 Mon Sep 17 00:00:00 2001 From: JonCr Date: Thu, 10 Nov 2022 23:43:22 -0800 Subject: Fix --- BlankConsoleLab/BlankConsoleLab.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'BlankConsoleLab/BlankConsoleLab.cpp') 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; -- cgit v1.2.3