aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch10-Debugging/CST116-Ch10-Debugging-Williams-Pseudocode.txt
blob: 5ee897cdde6d90d069c12717aea4bd17edd635c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
program start:

create a constant for SIZE and set it to 10
create int arrays of size SIZE for varX, varY, and varZ

run GetAndDisplayWelcomeInfo
run FunctionOne

run FunctionTwo
set varZ[SIZE-1] to -99
run PrintFunction

program end


GetandDisplayWelcomeInfo:
create an array NAME containing 2 chars of size 20
get the user's first and last name and store them in NAME
print a welcome message addressing the user by name

FunctionOne:
for each value in varX[i], set varY[i] to varX[i] + 100

FunctionTwo:
for each value in varX[i], set varZ[i] to varX[i] + varY[i]

PrintFunction(varX,varY,varZ):
print varX, varY, and varZ in a simple table