aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrenton Stark <[email protected]>2022-10-01 12:54:08 -0700
committerTrenton Stark <[email protected]>2022-10-01 12:54:08 -0700
commitef4bc62699b80f18db587e08db73c64318d9df36 (patch)
treeeae135e4a97e2d5775674f41e7c6ecc0b55a89a0
parentAdded a reponse to excersise 1, question 10 (diff)
downloadcst116-lab0-debugging-starktre-ef4bc62699b80f18db587e08db73c64318d9df36.tar.xz
cst116-lab0-debugging-starktre-ef4bc62699b80f18db587e08db73c64318d9df36.zip
Fixed the raise claculation
-rw-r--r--Ch 5 Debugging Project/Ch 5 Debugging Project.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp b/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp
index 72850e4..1944742 100644
--- a/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp
+++ b/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp
@@ -40,7 +40,11 @@
* 5) Notice that the current line of execution is now at the
* calculation.
* 6) Look at your watch. What is the value of money?
+* 123.449997
+*
* 7) Hover your mouse pointer over raise. What is its value?
+* 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 +82,7 @@ int main()
cout << "Enter percent raise: ";
cin >> raise;
- money = money * raise;
+ money += money * raise;
cout << "After your raise you have $";
cout << money << endl;