diff options
Diffstat (limited to 'CST116-Ch10-Debugging/CST116-Ch10-Smith-Pseudo-Code.txt')
| -rw-r--r-- | CST116-Ch10-Debugging/CST116-Ch10-Smith-Pseudo-Code.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Smith-Pseudo-Code.txt b/CST116-Ch10-Debugging/CST116-Ch10-Smith-Pseudo-Code.txt new file mode 100644 index 0000000..d0dda92 --- /dev/null +++ b/CST116-Ch10-Debugging/CST116-Ch10-Smith-Pseudo-Code.txt @@ -0,0 +1,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
\ No newline at end of file |