 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
Open voteFile for input (and verify success)
|
|
|
Open reportFile for output (and verify success)
|
|
|
Get candidate
names
|
|
|
Set votes
array to 0
|
|
|
Read precinct, candidate from voteFile
|
|
WHILE
NOT EOF on voteFile
|
|
|
Increment
votes[precinct-1][candidate-1]
|
|
Read precinct, candidate from voteFile
|
|
|
Write
report to reportFile
|
|
|
Write
totals per candidate to reportFile
|
|
|
Write
totals per precinct to reportFile
|
|