diff options
| author | Trevor Bouchillon <[email protected]> | 2022-10-30 16:39:06 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-10-30 16:39:06 -0700 |
| commit | ed8b57fd860b84b4f76fb7e9a5b5b0da6c614203 (patch) | |
| tree | 27a68546edc6fdb7cdba33eca36a0d8ec8793c46 /Ch11-Pseudocode-TrevorBouchillon.txt | |
| parent | output created (diff) | |
| download | cst116-ch11-debugging-daboochillin-ed8b57fd860b84b4f76fb7e9a5b5b0da6c614203.tar.xz cst116-ch11-debugging-daboochillin-ed8b57fd860b84b4f76fb7e9a5b5b0da6c614203.zip | |
Diffstat (limited to 'Ch11-Pseudocode-TrevorBouchillon.txt')
| -rw-r--r-- | Ch11-Pseudocode-TrevorBouchillon.txt | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Ch11-Pseudocode-TrevorBouchillon.txt b/Ch11-Pseudocode-TrevorBouchillon.txt new file mode 100644 index 0000000..e3fec34 --- /dev/null +++ b/Ch11-Pseudocode-TrevorBouchillon.txt @@ -0,0 +1,40 @@ +Create arrays name and age
+create varaible record counter
+
+create ifstream inFile
+
+create ofstream outFile
+
+open InFileName
+
+if infile is open
+set record_counter equal to function ReadData
+close infile
+
+if outfile is open
+run function WriteOutputFile
+run function PrintTotalAndSummary
+close outFile
+else
+display "Trouble Opening: ", OutFileName
+display **About to EXIT NOW!**
+else
+display "Trouble Opening: ", InFileName
+display **About to EXIT NOW!**
+return 0
+
+create function ReadData
+set int variable counter to 0
+input values in arrays into inFile.
+While !inFile.eof
+output values from name array and age array and format it on screen.
+set infile to name array and age array.
+
+create function WriteOutputFile
+write outfile "Here is the output file"
+create for loop to write data from name and age into the file.
+Format data in loop.
+
+create function PrintTotalsAndSummary
+display "Total Records: ", totalrecords, "The End"
+store in outFile "Total Records: ", totalrecords, "The End"
\ No newline at end of file |