From ed8b57fd860b84b4f76fb7e9a5b5b0da6c614203 Mon Sep 17 00:00:00 2001 From: Trevor Bouchillon <114636206+DaBoochillin@users.noreply.github.com> Date: Sun, 30 Oct 2022 16:39:06 -0700 Subject: Add files via upload --- Ch11-Pseudocode-TrevorBouchillon.txt | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Ch11-Pseudocode-TrevorBouchillon.txt (limited to 'Ch11-Pseudocode-TrevorBouchillon.txt') 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 -- cgit v1.2.3