aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah Wu <[email protected]>2022-10-12 02:12:07 -0700
committerHannah Wu <[email protected]>2022-10-12 02:12:07 -0700
commitb8ad331735d114f593a285741a55ffc66c5659fd (patch)
tree14545d96403df8779f4ab98cd62541ed26aa3109
parentAdded pseudocode file. Added output file. Updated main file. (diff)
downloadcst116-chapter8-debugging-wu-main.tar.xz
cst116-chapter8-debugging-wu-main.zip
Implemented changes to main file.HEADmain
-rw-r--r--CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp9
-rw-r--r--CST116-Ch8-Debugging/CST116-Ch8-Debugging.txt23
-rw-r--r--CST116-Ch8-Debugging/CST116-Ch8-DebuggingPseudocode.txt9
3 files changed, 37 insertions, 4 deletions
diff --git a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
index 53e4a61..e38c270 100644
--- a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
+++ b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
@@ -62,13 +62,14 @@ int main()
// Breakpoint 1
// Put a breakpoint on the following line
- while (i < 0);
- cout << i << endl;
+
+ while (i < 10)
+ cout << i++ << endl;
// Breakpoint 2
// Put a breakpoint on the following line
- for (count = 0; count < 10; count++);
+ for (count = 0; count < 10; count++) {
cout << count << endl;
-
+}
return 0;
}
diff --git a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.txt b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.txt
new file mode 100644
index 0000000..7135a37
--- /dev/null
+++ b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.txt
@@ -0,0 +1,23 @@
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+
+C:\Users\hanna\Source\Repos\cst116-chapter8-debugging-Wu\CST116-Ch8-Debugging\Debug\CST116-Ch8-Debugging.exe (process 35116) exited with code 0.
+Press any key to close this window . . . \ No newline at end of file
diff --git a/CST116-Ch8-Debugging/CST116-Ch8-DebuggingPseudocode.txt b/CST116-Ch8-Debugging/CST116-Ch8-DebuggingPseudocode.txt
new file mode 100644
index 0000000..51828af
--- /dev/null
+++ b/CST116-Ch8-Debugging/CST116-Ch8-DebuggingPseudocode.txt
@@ -0,0 +1,9 @@
+ Integer "i" = 0
+ Integer "count" uninitialized
+
+ WHILE i > 10
+ PRINT i
+ Add 1 to i
+
+ FOR count = 0 to 10
+ PRINT count \ No newline at end of file