aboutsummaryrefslogtreecommitdiff
path: root/CASt116-Ch10-Crombie-pseudocode.txt
blob: d1c79a401abb666820058f57f29d3eefaad8bdb8 (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
Declare functions
Set constant SIZE equal to 10
Run function main
	Create array varX
	Create array varY
	Create array varZ
	Run function GetAndDisplayWelcomeInfo
		Create array name
		Print "Please enter your first name: "
		Input name[0]
		Print "Please enter your last name: "
		Input name[1]
		Print "Welcome" name[0] " " name[1] "Hope all is well"
	Run function FunctionOne
		Set x equal to 0
		For x less than SIZE
			set varX[x] equal to x
			Increase x by 1
		Set x equal to 0
		For x less than SIZE
			Set varY[x] equal to x plus 100
			Increase x by 1
	Run function FunctionTwo
		Set varX[1] equal to 99
		Set x equal to 0
		For x less than SIZE
			Set varZ[x] equal to varX[x] plus varY[x]
	Set varZ[0] equat to -99
	Run function PrintFunction
		Print "   x   y   z"
		Set x equal to 0
		For x less than SIZE
			Print varX[x], varY[x], and varZ[x]