aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
diff options
context:
space:
mode:
authorTaylor Rogers <[email protected]>2022-10-08 14:58:05 -0700
committerTaylor Rogers <[email protected]>2022-10-08 14:58:05 -0700
commit77562481d1413b8e70f68cad87698a9738b92718 (patch)
tree76de26bb22b309aa92fac93e317c8f5ad6da05f0 /CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
parentAnswered exercise 2 Q6 (diff)
downloadcst116-ch7-debugging-taylorrog-77562481d1413b8e70f68cad87698a9738b92718.tar.xz
cst116-ch7-debugging-taylorrog-77562481d1413b8e70f68cad87698a9738b92718.zip
Answered exercise 3 Q3
Diffstat (limited to 'CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp')
-rw-r--r--CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
index 10862be..312dcf8 100644
--- a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
+++ b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
@@ -48,6 +48,9 @@
* 1) Run the program without debugging.
* 2) When prompted, enter the value of 10 for your age.
* 3) Why does the program print both "Child" and "Adult"?
+*
+* the semicolon after "else" is ending the statement, so the "cout" on the next line is not conditional and prints every time the program is run.
+*
* 4) Re-run the program this time with debugging and run to
* Breakpoint 2.
* 5) Why is the action with the else executing?