aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch10-Debugging
diff options
context:
space:
mode:
authorTrenton Stark <[email protected]>2022-10-23 18:25:29 -0700
committerTrenton Stark <[email protected]>2022-10-23 18:25:29 -0700
commit27cf976f8edd68acb642c26b9f921bdc680c6a8d (patch)
treeb960098c3e609182b3ff2e639c63e993b7715dc8 /CST116-Ch10-Debugging
parentAdded output file (diff)
downloadcst116-ch10-debugging-stark-27cf976f8edd68acb642c26b9f921bdc680c6a8d.tar.xz
cst116-ch10-debugging-stark-27cf976f8edd68acb642c26b9f921bdc680c6a8d.zip
Added psuedo code
Diffstat (limited to 'CST116-Ch10-Debugging')
-rw-r--r--CST116-Ch10-Debugging/CST116-Ch10-Debugging-Stark-Psuedocode.txt18
-rw-r--r--CST116-Ch10-Debugging/CST116-Ch10-Debugging-stark.cpp3
2 files changed, 19 insertions, 2 deletions
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging-Stark-Psuedocode.txt b/CST116-Ch10-Debugging/CST116-Ch10-Debugging-Stark-Psuedocode.txt
index e69de29..49a7fc6 100644
--- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging-Stark-Psuedocode.txt
+++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging-Stark-Psuedocode.txt
@@ -0,0 +1,18 @@
+Trenton Stark
+CST-116
+Chapter 10 Debugging
+
+Psuedo Code:
+Create 3 arrays with an SIZE number of elements varX, varY, varZ
+
+Input first and last name into 2d char array
+Output welcome message with name
+
+Set each element of varX to the value of its index
+Set each element of varY to the value of its index + 100
+
+Set each element of varZ to the sum of varX and varY at the same index
+
+Set varZ[0] t0 -99
+
+Output the values of all 3 arrays into an aligned table
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging-stark.cpp b/CST116-Ch10-Debugging/CST116-Ch10-Debugging-stark.cpp
index 946a3eb..7ea4aa5 100644
--- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging-stark.cpp
+++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging-stark.cpp
@@ -140,8 +140,7 @@ void FunctionTwo(int varX[], const int varY[], int varZ[])
for (int x = 0; x < SIZE; x++) // Notice the const SIZE here
varZ[x] = varX[x] + varY[x];
}
-void PrintFunction(const int varX[20], const int varY[20],
- const int varZ[20])
+void PrintFunction(const int varX[20], const int varY[20], const int varZ[20])
{
int x;