aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
diff options
context:
space:
mode:
authorHannah Wu <[email protected]>2022-10-11 23:09:36 -0700
committerHannah Wu <[email protected]>2022-10-11 23:09:36 -0700
commitec7f765cc512d0b66533ed476ce2da202d16bdc2 (patch)
tree1422e4155b822f58b670ba4d1a3c4d360024613d /CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
parentFixed main errors. Added pseudocode file. Added output text file. (diff)
downloadcst116-ch7-debugging-wu-ec7f765cc512d0b66533ed476ce2da202d16bdc2.tar.xz
cst116-ch7-debugging-wu-ec7f765cc512d0b66533ed476ce2da202d16bdc2.zip
UpdatesHEADmain
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;