aboutsummaryrefslogtreecommitdiff
path: root/CST116-Debug10-Pseudocode-Davis.rtf
blob: 8f1518c4e754ba35f633e27f50741214e3e1e631 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{\rtf1\ansi\ansicpg1252\cocoartf2639
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\margl1440\margr1440\vieww11520\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0

\f0\fs24 \cf0 Pseudo-code:\
\
Declare std statements\
\
Set const int SIZE = 10;\
\
Int main\
\{\
Set varX to SIZE\
Set varY to SIZE\
Set varZ to 99\
\
Go to GetAndDisplayWelcomeInfo\
Go to FunctionOne (using varX, varY)\
Go to FunctionTwo (using varX, varY, varZ)\
Go to PrintFunction (using varX, varY, varZ)\
\
Return nothing\
\}\
\
Void GetAndDisplayWelcomeInfo\
\{\
Set Char name[2][20]\
Print \'93Please enter your first name: \'93\
Set user input name[0]\
\
Print \'93Please enter your last name: \'93\
Set user input name[1]\
\
Print \'93Welcome \'93<<name[0] <<\'93 \'93<<name[1] << \'93! Hope all is well\'94\
\}\
Void FunctionOne(using varX, varY)\
\{\
For (int x =o; x<SIZE; + x)\
	varX[x] = x\
For (int x = 0; + x)\
	varY[x] = x + 100\
\}\
Void FunctionTwo (using varX, varY, varZ)\
\{\
For (x = 0; x < SIZE; + x)\
	varZ[x] = varX[x] +varY[x]\
\}\
Void PrintFunction (using varX, varY, varZ)\
\{\
Int x\
Print \'93x  y  z\'94\
\
For (x = 0; x < SIZE; + x)\
Print with 3 width <<varX[x]\
	3 width <<varY[x]\
	3 width <<varZ[x]\
End line\
\}}