summaryrefslogtreecommitdiff
path: root/Ch11-Pseudocode-TrevorBouchillon.txt
blob: e3fec3422613a0dbdf177ef2f754c7d5be18f02d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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"