Quote
2. Retrieve the names of the precinct files from reporting.in and as you read each precinct file name, open the corresponding file (precinct#.in) record the votes, and close the file.
I was thinking as I read it line from line, store each letter into an array element, and compare the index of the princinct number with an interger (switch?) and open the coresponding file. Is there an easier way?
reporting.in said:
precinct3
precinct1
precinct4
precinct0
precinct1
precinct4
precinct0
(I have to assume that I do not know that princint2 is not used. It is a general program.

New Topic/Question
Reply







MultiQuote





|