aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch5-Debugging
diff options
context:
space:
mode:
authorJonCr <[email protected]>2022-10-05 17:54:53 -0700
committerJonCr <[email protected]>2022-10-05 17:54:53 -0700
commit1a08cd5f8ffeb3e03c9a0bd0a2b8d543885796fd (patch)
treef758b8f36fb15d9b82de9d663a2707bc9f6ec017 /CST116-Ch5-Debugging
parentUpdate (diff)
downloadcst116-ch5-debugging-cognitiveshadow-main.tar.xz
cst116-ch5-debugging-cognitiveshadow-main.zip
FinishedHEADmain
Diffstat (limited to 'CST116-Ch5-Debugging')
-rw-r--r--CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp b/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp
index 4d09c03..932437e 100644
--- a/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp
+++ b/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp
@@ -40,7 +40,9 @@
* 5) Notice that the current line of execution is now at the
* calculation.
* 6) Look at your watch. What is the value of money?
+* A) It is $125.449997
* 7) Hover your mouse pointer over raise. What is its value?
+* A) It is 0.100000001
* 8) Step over the calculation. Notice the watch on money is now
* red. This designates that the variable just changed its value.
* 9) What happened to our money? I thought a raise was supposed
@@ -78,7 +80,7 @@ int main()
cout << "Enter percent raise: ";
cin >> raise;
- money = money * raise;
+ money = money * (1 + raise);
cout << "After your raise you have $";
cout << money << endl;