aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch10-Debugging-PseudoCode-Florea.txt
diff options
context:
space:
mode:
authorAndrei F <[email protected]>2022-10-26 21:22:26 -0700
committerAndrei F <[email protected]>2022-10-26 21:22:26 -0700
commit33909238220f80d203968911d54a6595a3f1a583 (patch)
treec389201c38bdf0d13248b4d3881a769a12507229 /CST116-Ch10-Debugging-PseudoCode-Florea.txt
parentCompleted all Debugging Exercises (diff)
downloadcst116-ch10-debugging-florea-33909238220f80d203968911d54a6595a3f1a583.tar.xz
cst116-ch10-debugging-florea-33909238220f80d203968911d54a6595a3f1a583.zip
Added pseudo code
Diffstat (limited to 'CST116-Ch10-Debugging-PseudoCode-Florea.txt')
-rw-r--r--CST116-Ch10-Debugging-PseudoCode-Florea.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/CST116-Ch10-Debugging-PseudoCode-Florea.txt b/CST116-Ch10-Debugging-PseudoCode-Florea.txt
new file mode 100644
index 0000000..eb1a27d
--- /dev/null
+++ b/CST116-Ch10-Debugging-PseudoCode-Florea.txt
@@ -0,0 +1,40 @@
+initialize constant var SIZE, set it to 10
+
+initialize list varX with SIZE as the amount of items
+initialize list varY with SIZE as the amount of items
+initialize list varZ with SIZE as the amount of items
+
+call func GetAndDisplayWelcomeInfo
+call func FunctionOne(pass varX, pass varY)
+
+call func FunctionTwo(pass varX, varY, varZ)
+
+set the first item of varZ equal to -99
+
+call func PrintFunction(pass varX, varY, varZ)
+
+define func void GetAndDisplayWelcomeInfo()
+ initialize 2D list name[2][20]
+ display Please enter first name
+ user input to name[0]
+
+ display Please enter last name
+ user input to name[1]
+
+ display Welcome name[0] name[1], Hope all is well
+
+define func void FunctionOne(param int list, param const int list, param int list)
+ set the second item of varX equal to 99
+
+ for loop (x = 0, x < SIZE, x steps by 1)
+ varZ[x] = varX[x] + varY[x] (setting the values of varZ)
+
+define func PrintFunction(param const int list, param const int list)
+ initialize var x
+
+ display X Y Z
+
+ for loop (x = 0, x < SIZE, x steps by 1)
+ display value varX[x]
+ display value varY[x]
+ display value varZ[x] \ No newline at end of file