aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch10-Debugging/CST116 Ch10-Debugging-Pseudo_Code.txt
blob: b5b00c4b3ad566f0c477c21a994711e643977757 (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
--Directive--

	Get user name
	display user name
	display a frendly greeting
	display an array heading
	display an array that is predefined with:
		values of x going up by 1 starting at 0
		values of y going up by 1 starting at 100
		values of z as the sum of x and y

--Execution--
	
	Define array size

	Program main sequence:
		
		greeting
		x,y function
		z function
		print array function

	Section the program into functions:

		function for greeting-
			ask for first name and sto in var
			ask for last name and sto in var
			print welcome first name var, last name var
				hope all is well

		function for x and y-
			loop 
				x up by incraments of 1 every cycle referencing the array 
				size to determine the amount of times the cycle is to repeat
				y is x + 100 every cycle

		function for z-
			loop
				z increase by summing the current value of x and y every cycle referencing the array
				size to determine the amount of times the cycle is to repeat

		print array function-
			
			establish the maximum size of the array as 20
			output x, y and z heading formatted with tabs
			output x, y and z values formatted 3 spaces appart