diff options
| author | Musa Ahmed <[email protected]> | 2022-10-25 18:31:55 -0700 |
|---|---|---|
| committer | Musa Ahmed <[email protected]> | 2022-10-25 18:31:55 -0700 |
| commit | c98b9abd6d5c12b2bd42da93f87cda70b5a5bae9 (patch) | |
| tree | b462adbea16002a881b5bc2b52944226ac7c21d4 /CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Pseudocode-Ahmed.txt | |
| parent | Added output text file (diff) | |
| download | cst116-ch10-debugging-m005a-main.tar.xz cst116-ch10-debugging-m005a-main.zip | |
Diffstat (limited to 'CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Pseudocode-Ahmed.txt')
| -rw-r--r-- | CST116-Ch10-Debugging-Ahmed/CST116-Ch10-Debugging-Pseudocode-Ahmed.txt | 53 |
1 files changed, 53 insertions, 0 deletions
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 |