From 1a08cd5f8ffeb3e03c9a0bd0a2b8d543885796fd Mon Sep 17 00:00:00 2001 From: JonCr Date: Wed, 5 Oct 2022 17:54:53 -0700 Subject: Finished --- CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp') 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; -- cgit v1.2.3