summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp6
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;