aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
diff options
context:
space:
mode:
authorTim Pearse <[email protected]>2022-10-12 16:28:21 -0700
committerTim Pearse <[email protected]>2022-10-12 16:28:21 -0700
commitcf82bbd4f5cee0ad0dd71aca77d504296d65ea6b (patch)
tree8cf5941bcd2c393d70c1ebe10b40d7eb0c09a4a8 /CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
parentChange 0 : Uploading gitignore file (diff)
downloadcst116-ch7-debugging-legokid1503-cf82bbd4f5cee0ad0dd71aca77d504296d65ea6b.tar.xz
cst116-ch7-debugging-legokid1503-cf82bbd4f5cee0ad0dd71aca77d504296d65ea6b.zip
Change 1: The debugging, output, and pseudocode.HEADmain
Diffstat (limited to 'CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp')
-rw-r--r--CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
index f64adfe..bc89e29 100644
--- a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
+++ b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
@@ -56,9 +56,9 @@ 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)
cout << "Child" << endl;
@@ -66,8 +66,9 @@ int main()
cout << "Senior" << endl;
// Breakpoint 2
// Put a breakpoint on the following line
- else;
- cout << "Adult" << endl;
+ else {
+ cout << "Adult" << endl;
+ }
return 0;
} \ No newline at end of file