diff options
| author | Tim Pearse <[email protected]> | 2022-10-01 13:32:52 -0700 |
|---|---|---|
| committer | Tim Pearse <[email protected]> | 2022-10-01 13:32:52 -0700 |
| commit | 37d23bf1cb599f7057840ec804345d56b1c102f4 (patch) | |
| tree | cf9b90c4e2f39a852498408314a2928fa0d5f8e0 /Ch 5 Debugging Project/Ch 5 Debugging Project.cpp | |
| parent | Merge branch 'main' of https://github.com/CST116/cst116-lab0-debugging-legoki... (diff) | |
| download | cst116-lab0-debugging-legokid1503-37d23bf1cb599f7057840ec804345d56b1c102f4.tar.xz cst116-lab0-debugging-legokid1503-37d23bf1cb599f7057840ec804345d56b1c102f4.zip | |
Change 1: Went through Debugging Exercises 1 & 2.
Next Step : Debugging Exercise 3
Diffstat (limited to 'Ch 5 Debugging Project/Ch 5 Debugging Project.cpp')
| -rw-r--r-- | Ch 5 Debugging Project/Ch 5 Debugging Project.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
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;
|