diff options
| -rw-r--r-- | CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp | 10 | ||||
| -rw-r--r-- | cst116-Ch8-Pearse-Pseudocode.txt | 12 | ||||
| -rw-r--r-- | cst116-Ch8-Pearse.txt | 23 |
3 files changed, 41 insertions, 4 deletions
diff --git a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp index 53e4a61..8350a1e 100644 --- a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp +++ b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp @@ -62,13 +62,15 @@ 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++);
- cout << count << endl;
+ for (count = 0; count < 10; count++) {
+ cout << count << endl;
+ }
return 0;
}
diff --git a/cst116-Ch8-Pearse-Pseudocode.txt b/cst116-Ch8-Pearse-Pseudocode.txt new file mode 100644 index 0000000..3d6534a --- /dev/null +++ b/cst116-Ch8-Pearse-Pseudocode.txt @@ -0,0 +1,12 @@ +main(){ + int i = 0 + int count + + while (i < 10) { + print(i) + i++ + } + for (count = 0; count < 10; count++){ + print(count) + } +}
\ No newline at end of file diff --git a/cst116-Ch8-Pearse.txt b/cst116-Ch8-Pearse.txt new file mode 100644 index 0000000..9f64737 --- /dev/null +++ b/cst116-Ch8-Pearse.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\legok\Source\Repos\cst116-chapter8-debugging-legokid1503\CST116-Ch8-Debugging\x64\Debug\CST116-Ch8-Debugging.exe (process 3708) exited with code 0. +Press any key to close this window . . .
\ No newline at end of file |