Electrical and Computer Engineering
13 of 19
UAH
CPE 112
Implementation
•void ZeroVotes( /*out*/ VoteArray votes ) // Array of vote totals
•
•// Zeroes out the votes array`
•
•{
•   int precinct;       // Loop counter
•   int candidate;      // Loop counter
•
•   for (precinct = 0; precinct < NUM_PRECINCTS; precinct++)
•     for (candidate = 0; candidate < NUM_CANDIDATES; candidate++)
•        votes[precinct][candidate] = 0;
•}