aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp')
-rw-r--r--CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
index f64adfe..75cfd49 100644
--- a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
+++ b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
@@ -56,17 +56,17 @@ int main()
// Breakpoint 1
// Put a breakpoint on the following line
- if (age = 1)
+ if (age == 1)
cout << "First Birthday" << endl;
- else if (age >= 12 || age <= 19)
+ else if (age >= 12 && age <= 19)
cout << "Teenager" << endl;
- else if (age < 12)
+ else if (age <= 12 && age >= 1)
cout << "Child" << endl;
- else if (age > 62)
+ else if (age >= 62)
cout << "Senior" << endl;
// Breakpoint 2
// Put a breakpoint on the following line
- else;
+ else if (age >=18 && age <= 62)
cout << "Adult" << endl;
return 0;