diff options
Diffstat (limited to 'Ch 5 Debugging Project')
18 files changed, 17 insertions, 10 deletions
diff --git a/Ch 5 Debugging Project/Ch 5 Debugging Project Pseudocode.txt b/Ch 5 Debugging Project/Ch 5 Debugging Project Pseudocode.txt new file mode 100644 index 0000000..265a0ac --- /dev/null +++ b/Ch 5 Debugging Project/Ch 5 Debugging Project Pseudocode.txt @@ -0,0 +1,5 @@ +SET MONEY=123.45 +IF RAISE input=!0 THEN set value of RAISE + SET N= MONEY*RAISE + OUTPUT= MONEY+N +PRINT OUTPUT
\ No newline at end of file diff --git a/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp b/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp index 6545e9b..4058c23 100644 --- a/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp +++ b/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp @@ -25,6 +25,7 @@ * line.
* 10) Step over the next cout statement. Now look at the console
* window. What was printed?
+* A: Nothing. After ignoring all the cout statements there is nothing printed.
* 11) Select Stop Debugging either from the Debug menu or from your
* toolbar.
*
@@ -43,6 +44,7 @@ * red. This designates that the variable just changed its value.
* 9) What happened to our money? I thought a raise was supposed
* to increase our money? Stop debugging and fix the calculation.
+* A: Original calculation is money*raise. Change to money+(money*raise) to get the correct calculation.
*
* Debugging Exercise 3
*
@@ -76,7 +78,7 @@ int main() cout << "Enter percent raise: ";
cin >> raise;
- money = money * raise;
+ money = money + (money*raise);
cout << "After your raise you have $";
cout << money << endl;
diff --git a/Ch 5 Debugging Project/Ch 5 Debugging Project.txt b/Ch 5 Debugging Project/Ch 5 Debugging Project.txt new file mode 100644 index 0000000..71b6665 --- /dev/null +++ b/Ch 5 Debugging Project/Ch 5 Debugging Project.txt @@ -0,0 +1,6 @@ +You have $123.45 +Enter percent raise: 0.1 +After your raise you have $135.795 + +C:\Users\hanna\Source\Repos\cst116-lab0-debugging-Wu\Ch 5 Debugging Project\Debug\Ch 5 Debugging Project.exe (process 25540) exited with code 0. +Press any key to close this window . . .
\ No newline at end of file diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.command.1.tlog b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.command.1.tlog Binary files differindex b32ebb5..38db4e7 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.command.1.tlog +++ b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.command.1.tlog diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.read.1.tlog b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.read.1.tlog Binary files differindex 9be583f..7e51ca9 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.read.1.tlog +++ b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.read.1.tlog diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.write.1.tlog b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.write.1.tlog Binary files differindex e2dcabf..a0331d7 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.write.1.tlog +++ b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.write.1.tlog diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/Ch 5 Debugging Project.lastbuildstate b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/Ch 5 Debugging Project.lastbuildstate index f13b9e7..54cb635 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/Ch 5 Debugging Project.lastbuildstate +++ b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/Ch 5 Debugging Project.lastbuildstate @@ -1,2 +1,2 @@ PlatformToolSet=v143:VCToolArchitecture=Native32Bit:VCToolsVersion=14.33.31629:TargetPlatformVersion=10.0.19041.0:
-Debug|Win32|C:\Users\hanna\Source\Repos\cst116-lab0-debugging-HJCST\Ch 5 Debugging Project\|
+Debug|Win32|C:\Users\hanna\Source\Repos\cst116-lab0-debugging-Wu\Ch 5 Debugging Project\|
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.command.1.tlog b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.command.1.tlog Binary files differindex acb15f4..ff93cc3 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.command.1.tlog +++ b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.command.1.tlog diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.read.1.tlog b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.read.1.tlog Binary files differindex 030cbcf..7b1cae3 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.read.1.tlog +++ b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.read.1.tlog diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.write.1.tlog b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.write.1.tlog Binary files differindex 20f0112..527177f 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.write.1.tlog +++ b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.write.1.tlog diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe Binary files differindex 498dda8..bc5f5bb 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe +++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe.recipe b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe.recipe index d026c61..08eb3e9 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe.recipe +++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe.recipe @@ -2,7 +2,7 @@ <Project>
<ProjectOutputs>
<ProjectOutput>
- <FullPath>C:\Users\hanna\Source\Repos\cst116-lab0-debugging-HJCST\Ch 5 Debugging Project\Debug\Ch 5 Debugging Project.exe</FullPath>
+ <FullPath>C:\Users\hanna\Source\Repos\cst116-lab0-debugging-Wu\Ch 5 Debugging Project\Debug\Ch 5 Debugging Project.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk Binary files differindex d0d0bea..d634618 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk +++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj Binary files differindex f145f4c..19904bd 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj +++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb Binary files differindex cf5b753..25c242c 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb +++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.vcxproj.FileListAbsolute.txt b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.vcxproj.FileListAbsolute.txt index 7a25d0e..6759b3a 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.vcxproj.FileListAbsolute.txt +++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.vcxproj.FileListAbsolute.txt @@ -1,2 +1,3 @@ C:\Users\martha.chamberlin\source\repos\Ch 5 Debugging Project\Debug\Ch 5 Debugging Project.exe
C:\Users\hanna\Source\Repos\cst116-lab0-debugging-HJCST\Ch 5 Debugging Project\Debug\Ch 5 Debugging Project.exe
+C:\Users\hanna\Source\Repos\cst116-lab0-debugging-Wu\Ch 5 Debugging Project\Debug\Ch 5 Debugging Project.exe
diff --git a/Ch 5 Debugging Project/NewFile b/Ch 5 Debugging Project/NewFile deleted file mode 100644 index e69de29..0000000 --- a/Ch 5 Debugging Project/NewFile +++ /dev/null diff --git a/Ch 5 Debugging Project/TextFile1.txt b/Ch 5 Debugging Project/TextFile1.txt deleted file mode 100644 index c01f008..0000000 --- a/Ch 5 Debugging Project/TextFile1.txt +++ /dev/null @@ -1,7 +0,0 @@ -You have $123.45 -Enter percent raise: .15 -After your raise you have $18.5175 - -C:\Users\hanna\Source\Repos\cst116-lab0-debugging-HJCST\Ch 5 Debugging Project\Debug\Ch 5 Debugging Project.exe (process 18428) 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 . . .
\ No newline at end of file |