diff options
| author | jacobdw22 <[email protected]> | 2022-10-05 16:22:49 -0700 |
|---|---|---|
| committer | jacobdw22 <[email protected]> | 2022-10-05 16:22:49 -0700 |
| commit | 77bb95fc02da5b14dc323408597b963b4e9ac6aa (patch) | |
| tree | a34f2aa721c41f3cc33eeec372a0343424d8a769 | |
| parent | simple changes (diff) | |
| download | cst116-ch7-debugging-jacobdw22-77bb95fc02da5b14dc323408597b963b4e9ac6aa.tar.xz cst116-ch7-debugging-jacobdw22-77bb95fc02da5b14dc323408597b963b4e9ac6aa.zip | |
simple changes
| -rw-r--r-- | CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp index f64adfe..de19662 100644 --- a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp +++ b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp @@ -1,6 +1,6 @@ /********************************************************************
* File: CST116-Ch7-Debugging.cpp
-*
+* Jacob Wilson, CST116
* General Instructions: Complete each step before proceeding to the
* next.
*
@@ -13,6 +13,7 @@ * the value in age is what you typed in.
* 5) Step over the if statement.
* 6) Why did the value in age change?
+* set = 1 set the age back to 1
* 7) Fix the problem and repeat Steps 2 � 5 to verify the
* problem was corrected.
* 8) Stop debugging.
@@ -36,6 +37,7 @@ * 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 adult statement is not actually in the else statement. It is just a regular print statement.
* 4) Re-run the program this time with debugging and run to
* Breakpoint 2.
* 5) Why is the action with the else executing?
@@ -56,7 +58,7 @@ 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)
cout << "Teenager" << endl;
|