From bf5df704a062a3714d38589cc1d7a647cf8b2a14 Mon Sep 17 00:00:00 2001 From: Joe Traver Date: Wed, 26 Oct 2022 20:56:29 -0700 Subject: Added pseudo code and finished the assignment --- .../CST116 Ch10-Debugging-Pseudo_Code.txt | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 CST116-Ch10-Debugging/CST116 Ch10-Debugging-Pseudo_Code.txt (limited to 'CST116-Ch10-Debugging/CST116 Ch10-Debugging-Pseudo_Code.txt') diff --git a/CST116-Ch10-Debugging/CST116 Ch10-Debugging-Pseudo_Code.txt b/CST116-Ch10-Debugging/CST116 Ch10-Debugging-Pseudo_Code.txt new file mode 100644 index 0000000..b5b00c4 --- /dev/null +++ b/CST116-Ch10-Debugging/CST116 Ch10-Debugging-Pseudo_Code.txt @@ -0,0 +1,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 \ No newline at end of file -- cgit v1.2.3