diff options
| author | Anibal LopezBonilla <[email protected]> | 2022-10-06 18:53:52 -0700 |
|---|---|---|
| committer | Anibal LopezBonilla <[email protected]> | 2022-10-06 18:53:52 -0700 |
| commit | bf41b0ce1324eb5b4f301e8f9cf3a1e784f3be69 (patch) | |
| tree | f57ca8ab7d2153e49c1bb318a412ffb9999a2974 /CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp | |
| parent | Setting up GitHub Classroom Feedback (diff) | |
| download | cst116-ch7-debugging-lopez-bonilla-bf41b0ce1324eb5b4f301e8f9cf3a1e784f3be69.tar.xz cst116-ch7-debugging-lopez-bonilla-bf41b0ce1324eb5b4f301e8f9cf3a1e784f3be69.zip | |
Push 1
Diffstat (limited to 'CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp')
| -rw-r--r-- | CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp index f64adfe..cf110a7 100644 --- a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp +++ b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp @@ -13,6 +13,9 @@ * the value in age is what you typed in.
* 5) Step over the if statement.
* 6) Why did the value in age change?
+*
+* ANS: Because there is only one equal sign in the if statement
+*
* 7) Fix the problem and repeat Steps 2 � 5 to verify the
* problem was corrected.
* 8) Stop debugging.
@@ -56,7 +59,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;
|