blob: d0dda92e7d9d7b5e36231c402f7b905434ee2eff (
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
|
Pre-Processing:
1) Initialize void functions 'GetAndDisplayWelcomeInfo' 'FunctionsONe' 'FunctionTwo' and 'PrintFunction'
2) Initialize constant 'SIZE' to be 10
int main:
1) Initialize arrays 'varX' 'varY' and 'varZ'
2) Call funtion 'GetAndDisplayWelcome'
3) Call function 'FunctionOne' using 'varX' and 'varY' as its inputs
4) Call function 'FunctionTwo' using 'varX' 'varY' and 'varZ' as its inputs
5) Change position [0] of 'varZ' to -99
6) Change position [1] of 'varX' to 99
7) Call function 'PrintFunction' using 'varX' 'varY' and 'varZ' aas its inputs
GetAndDisplayWelcomeInfo:
1) Initialize 2D array 'name' with 2 sets of 20 characters
2) Set the first set of 20 characters in the array 'name' to the user's input
3) Set the second set of 20 characters in the array 'name' to the user's input
4) Output a welcome message
FunctionOne:
1) Set every value in the array 'varX' to be the next increment in value from the range 0 � (SIZE - 1)
2) Set every value in the array 'varY' to be the position-associated value in 'varX' + 100
FunctionTwo:
1) Set every value in the arrat 'varZ' to be the sum of the position-associated values in 'varX' and 'var'Y
PrintFunction:
1) Initialize an int variable 'x'
2) Output the values of 'varX' 'varY' and 'varZ' in a nice, fancily-ordered fashion
|