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 ++++++++++++++++++++++ CST116-Ch10-Debugging/CST116-Ch10-Debugging.sln | 3 +- .../CST116-Ch10-Debuggung-Code-Output.txt | 20 ++++++++++ CST116-Ch10-Debugging/Code Output.txt | 20 ---------- 4 files changed, 68 insertions(+), 21 deletions(-) create mode 100644 CST116-Ch10-Debugging/CST116 Ch10-Debugging-Pseudo_Code.txt create mode 100644 CST116-Ch10-Debugging/CST116-Ch10-Debuggung-Code-Output.txt delete mode 100644 CST116-Ch10-Debugging/Code Output.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 diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.sln b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.sln index 5ddee71..c46d5b3 100644 --- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.sln +++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.sln @@ -7,7 +7,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CST116-Ch10-Debugging", "CS EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7131F0DD-0A37-4F9B-BE95-FAAE337D6DAB}" ProjectSection(SolutionItems) = preProject - Code Output.txt = Code Output.txt + CST116 Ch10-Debugging-Pseudo_Code.txt = CST116 Ch10-Debugging-Pseudo_Code.txt + CST116-Ch10-Debuggung-Code-Output.txt = CST116-Ch10-Debuggung-Code-Output.txt EndProjectSection EndProject Global diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debuggung-Code-Output.txt b/CST116-Ch10-Debugging/CST116-Ch10-Debuggung-Code-Output.txt new file mode 100644 index 0000000..65a30a0 --- /dev/null +++ b/CST116-Ch10-Debugging/CST116-Ch10-Debuggung-Code-Output.txt @@ -0,0 +1,20 @@ +Please enter your first name: Joe + +Please enter your last name: Traver + + + Welcome Joe Traver! + Hope all is well + + x y z + + 0 100 -99 + 99 101 200 + 2 102 104 + 3 103 106 + 4 104 108 + 5 105 110 + 6 106 112 + 7 107 114 + 8 108 116 + 9 109 118 \ No newline at end of file diff --git a/CST116-Ch10-Debugging/Code Output.txt b/CST116-Ch10-Debugging/Code Output.txt deleted file mode 100644 index 65a30a0..0000000 --- a/CST116-Ch10-Debugging/Code Output.txt +++ /dev/null @@ -1,20 +0,0 @@ -Please enter your first name: Joe - -Please enter your last name: Traver - - - Welcome Joe Traver! - Hope all is well - - x y z - - 0 100 -99 - 99 101 200 - 2 102 104 - 3 103 106 - 4 104 108 - 5 105 110 - 6 106 112 - 7 107 114 - 8 108 116 - 9 109 118 \ No newline at end of file -- cgit v1.2.3