From 37d23bf1cb599f7057840ec804345d56b1c102f4 Mon Sep 17 00:00:00 2001 From: Tim Pearse Date: Sat, 1 Oct 2022 13:32:52 -0700 Subject: Change 1: Went through Debugging Exercises 1 & 2. Next Step : Debugging Exercise 3 --- Ch 5 Debugging Project/Ch 5 Debugging Project.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'Ch 5 Debugging Project/Ch 5 Debugging Project.cpp') diff --git a/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp b/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp index c2a52a9..3a09c34 100644 --- a/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp +++ b/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp @@ -3,7 +3,7 @@ * * Changing because I can * -* General Instructions: Complete each step before proceeding to the +* General Instructions: Complete each step before proceeding t o the * next. * * Debugging Exercise 1 @@ -18,6 +18,7 @@ * the current line being that cout statement, Step Into again. * 6) What happened? Where are we now? What is all of this nasty * looking code? +* I am not seeing any nasty code while going through this process. From reading ahead, this code is probably in the std library. * 7) Remember, stepping into a predefined routine takes you to the * code for that routine. If the debugger can't find the code it * will show the assembly code for that routine. @@ -27,6 +28,15 @@ * line. * 10) Step over the next cout statement. Now look at the console * window. What was printed? + + You have $123.45 + Enter percent raise: 2 + After your raise you have $246.9 + + C:\Users\legok\source\repos\cst116-lab0-debugging-legokid1503\Ch 5 Debugging Project\x64\Debug\Ch 5 Debugging Project.exe (process 25068) exited with code 0. + To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops. + Press any key to close this window . . . + * 11) Select Stop Debugging either from the Debug menu or from your * toolbar. * @@ -67,7 +77,7 @@ using std::endl; int main() { - float money = 123.45F; + float money = 20.00F; float raise; cout << "You have $"; @@ -79,7 +89,7 @@ int main() cin >> raise; - money = money * raise; + money = money * (1 + raise * .01); cout << "After your raise you have $"; cout << money << endl; -- cgit v1.2.3