Electrical and Computer Engineering
19 of 19
UAH
CPE 112
Implementation
•     // Compute row sum
•
•     for (candidate = 0; candidate < NUM_CANDIDATES; candidate++)
•         total = total + votes[precinct][candidate];
•
•     reportFile << "Total votes for precinct"
•                  << setw(3) << precinct + 1 << ':'
•                  << setw(3) << total << endl;
•  }
•}
•
•