From 7acac08e66fbb1e435d5e85612fc4e9ec09712ec Mon Sep 17 00:00:00 2001 From: JonCr Date: Thu, 10 Nov 2022 23:42:20 -0800 Subject: Update --- 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 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; -- cgit v1.2.3