blob: 322aa48e2a4f76dcd464eb0a32612d13d6e97461 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
character array name[20][21]
integery age[20]
record counter integer.
input stream inFile
output file stream outFile
open input and output sreams with correct filenames
if the file opens, continue, otherwise error and return.
read the data from the file, save the inputs to name and age, counter++ for each line read
close inFile
if outFile is open, continue, otherwise error and return.
Write to the output file, output file will be a table of names and ages
Print totals and summaries to the console.
close outFile.
return0
|