From 28585c759a375fff1b4246a17db97f29b0009546 Mon Sep 17 00:00:00 2001 From: Hannah Wu Date: Tue, 11 Oct 2022 21:09:04 -0700 Subject: Added answers to top of program. Corrected program. Added output textfile. Added pseudocode text file. --- .../Ch 5 Debugging Project Pseudocode.txt | 5 +++++ Ch 5 Debugging Project/Ch 5 Debugging Project.cpp | 4 +++- Ch 5 Debugging Project/Ch 5 Debugging Project.txt | 6 ++++++ .../Debug/Ch 5 Deb.57683855.tlog/CL.command.1.tlog | Bin 1890 -> 2854 bytes .../Debug/Ch 5 Deb.57683855.tlog/CL.read.1.tlog | Bin 41552 -> 61920 bytes .../Debug/Ch 5 Deb.57683855.tlog/CL.write.1.tlog | Bin 1526 -> 2328 bytes .../Ch 5 Debugging Project.lastbuildstate | 2 +- .../Ch 5 Deb.57683855.tlog/link.command.1.tlog | Bin 3310 -> 5004 bytes .../Debug/Ch 5 Deb.57683855.tlog/link.read.1.tlog | Bin 7502 -> 11134 bytes .../Debug/Ch 5 Deb.57683855.tlog/link.write.1.tlog | Bin 1686 -> 2568 bytes .../Debug/Ch 5 Debugging Project.exe | Bin 53760 -> 53760 bytes .../Debug/Ch 5 Debugging Project.exe.recipe | 2 +- .../Debug/Ch 5 Debugging Project.ilk | Bin 507004 -> 524548 bytes .../Debug/Ch 5 Debugging Project.obj | Bin 83784 -> 83780 bytes .../Debug/Ch 5 Debugging Project.pdb | Bin 1822720 -> 2068480 bytes ... Debugging Project.vcxproj.FileListAbsolute.txt | 1 + Ch 5 Debugging Project/NewFile | 0 Ch 5 Debugging Project/TextFile1.txt | 7 ------- 18 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 Ch 5 Debugging Project/Ch 5 Debugging Project Pseudocode.txt create mode 100644 Ch 5 Debugging Project/Ch 5 Debugging Project.txt delete mode 100644 Ch 5 Debugging Project/NewFile delete mode 100644 Ch 5 Debugging Project/TextFile1.txt 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 index b32ebb5..38db4e7 100644 Binary files a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.command.1.tlog and b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.command.1.tlog differ 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 index 9be583f..7e51ca9 100644 Binary files a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.read.1.tlog and b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.read.1.tlog differ 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 index e2dcabf..a0331d7 100644 Binary files a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.write.1.tlog and b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.write.1.tlog differ 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 index acb15f4..ff93cc3 100644 Binary files a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.command.1.tlog and b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.command.1.tlog differ 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 index 030cbcf..7b1cae3 100644 Binary files a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.read.1.tlog and b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.read.1.tlog differ 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 index 20f0112..527177f 100644 Binary files a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.write.1.tlog and b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.write.1.tlog differ diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe index 498dda8..bc5f5bb 100644 Binary files a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe and b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe differ 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 @@ - 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/Debug/Ch 5 Debugging Project.ilk b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk index d0d0bea..d634618 100644 Binary files a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk and b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk differ diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj index f145f4c..19904bd 100644 Binary files a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj and b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj differ diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb index cf5b753..25c242c 100644 Binary files a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb and b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb differ 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 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 -- cgit v1.2.3