summaryrefslogtreecommitdiff
path: root/BlankConsoleLab
diff options
context:
space:
mode:
authorJonCr <[email protected]>2022-11-10 23:42:20 -0800
committerJonCr <[email protected]>2022-11-10 23:42:20 -0800
commit7acac08e66fbb1e435d5e85612fc4e9ec09712ec (patch)
tree7117e8a3a34e5960bdc1f1c16aa430d86ae0b35c /BlankConsoleLab
parentUpdate (diff)
downloadcst116-lab2-cognitiveshadow-7acac08e66fbb1e435d5e85612fc4e9ec09712ec.tar.xz
cst116-lab2-cognitiveshadow-7acac08e66fbb1e435d5e85612fc4e9ec09712ec.zip
Update
Diffstat (limited to 'BlankConsoleLab')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp6
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;