aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch7-Debugging
diff options
context:
space:
mode:
authorJoe Traver <[email protected]>2022-10-11 21:16:29 -0700
committerJoe Traver <[email protected]>2022-10-11 21:16:29 -0700
commit0cb411e179b5bc88e72977d74f02bb15bffe91c0 (patch)
tree7f50d1b46a4942ec8f20e919200919d629b625df /CST116-Ch7-Debugging
parentAnswered question for exercise 2 and made correction (diff)
downloadcst116-ch7-debugging-joetraver30-0cb411e179b5bc88e72977d74f02bb15bffe91c0.tar.xz
cst116-ch7-debugging-joetraver30-0cb411e179b5bc88e72977d74f02bb15bffe91c0.zip
Finished all questions and program corrections
Diffstat (limited to 'CST116-Ch7-Debugging')
-rw-r--r--CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
index d395096..d9cdd8a 100644
--- a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
+++ b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp
@@ -42,6 +42,10 @@
* 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"?
+*
+* -There was a colon after the else terminating the line making the last condition met the (child) print
+* and output "adult" simply because it is an output command independant of the ended else statement-
+*
* 4) Re-run the program this time with debugging and run to
* Breakpoint 2.
* 5) Why is the action with the else executing?
@@ -74,7 +78,7 @@ int main()
else if (age > 62)
cout << "Senior" << endl;
-
+
// Breakpoint 2
// Put a breakpoint on the following line
else