aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMusa Ahmed <[email protected]>2022-10-25 18:31:55 -0700
committerMusa Ahmed <[email protected]>2022-10-25 18:31:55 -0700
commitc98b9abd6d5c12b2bd42da93f87cda70b5a5bae9 (patch)
treeb462adbea16002a881b5bc2b52944226ac7c21d4
parentAdded output text file (diff)
downloadcst116-ch10-debugging-m005a-c98b9abd6d5c12b2bd42da93f87cda70b5a5bae9.tar.xz
cst116-ch10-debugging-m005a-c98b9abd6d5c12b2bd42da93f87cda70b5a5bae9.zip
Added pseudocodeHEADmain
-rw-r--r--CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Ahmed.vcxproj1
-rw-r--r--CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Ahmed.vcxproj.filters3
-rw-r--r--CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Pseudocode-Ahmed.txt53
3 files changed, 57 insertions, 0 deletions
diff --git a/CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Ahmed.vcxproj b/CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Ahmed.vcxproj
index 2954934..d790bd2 100644
--- a/CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Ahmed.vcxproj
+++ b/CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Ahmed.vcxproj
@@ -131,6 +131,7 @@
</ItemGroup>
<ItemGroup>
<Text Include="CST116-Ch10-Debugging-Ahmed.txt" />
+ <Text Include="CST116-Ch10-Debugging-Pseudocode-Ahmed.txt" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Ahmed.vcxproj.filters b/CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Ahmed.vcxproj.filters
index ce05403..975b2c9 100644
--- a/CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Ahmed.vcxproj.filters
+++ b/CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Ahmed.vcxproj.filters
@@ -23,5 +23,8 @@
<Text Include="CST116-Ch10-Debugging-Ahmed.txt">
<Filter>Source Files</Filter>
</Text>
+ <Text Include="CST116-Ch10-Debugging-Pseudocode-Ahmed.txt">
+ <Filter>Source Files</Filter>
+ </Text>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Pseudocode-Ahmed.txt b/CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Pseudocode-Ahmed.txt
new file mode 100644
index 0000000..b6c6f4d
--- /dev/null
+++ b/CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Pseudocode-Ahmed.txt
@@ -0,0 +1,53 @@
+Initialize a void function GetAndDisplayWelcomeInfo() which takes no input
+Initialize a void function FunctionOne(int varX[], int varY[]), which takes two int arrays as inputs
+Initialize a void function FunctionTwo(int varX[], const int varY[], int varZ[]) which takes three int arrays as inputs
+Initialize a void function PrintFunction(int varX[], const int varY[], const int varZ[]) which also takes three int arrays as inputs
+
+Initialize a constant int SIZE to be equal to 10
+
+Start Main
+
+Initialize three int arrays, varX, varY, and varZ, all with a length of SIZE
+
+Call the function GetAndDisplayWelcomeInfor
+
+ (inside function. Not in main)
+
+ Initialize a char array with 2 rows and 20 columns
+
+ Ask the user for an input of their first name
+ Store it into the first row of name
+ Ask the user for an input of their last name
+ Store it into the last row of name
+
+ Print out the names by referencing their position in the array and print "Hope all is well"
+
+Call the function FunctionOne, and pass varX and varY into it as the two arrays
+
+ (inside function. Not in main)
+
+ Create a for loop and loop until the variable x is no longer less than SIZE (from 0 -> 9)
+ Assign x to every value of varX until the for loop breaks
+ Create another for loop and loop until the veriable x is no longer less than SIZE (from 0 -> 9)
+ Assing x + 100 to every value of varY until the for loop breaks
+
+Call the function FunctionTwo and pass varX, varY, and varZ as the three int arrays
+
+ (inside function. Not in main)
+
+ Set the second value of the array varX to 99
+ Create a for loop and loop until the variable x is no longer less than SIZE (from 0 -> 9)
+ Assign varX + varY at that index equal to varZ at the current index until the for loop breaks
+
+Assign the first value of the array varZ to -99
+
+Call the function PrintFunction which takes varX, varY, and varZ as inputs for the three int arrays
+
+ (inside function. Not in main)
+
+ Create a variable int x
+ Print out headers for x, y, and z
+ Create a for loop which iterates until int x is no longer less than SIZE (from 0 -> 9)
+ Print out each value of the arrays varX, varY, and varZ with a spacing of 3.
+
+End Main \ No newline at end of file