Solved by: AllAcademicHelp.com
| October 25, 2018
Write my research paperThe results from the mayor’s race have been reported by each precinct as follows:Candidate Candidate Candidate Candidate Precinct A B C D 1 192 48 206 37 2 147 90 312 21 3 186 12 121 38 4 114 21 408 39 5 267 13 382 29Write a program to do the following:Read the raw vote totals from a data file that contains one row for each precinct. Display the table with appropriate headings for the rows and columns. Compute and display the total number of votes received by each candidate and the percent of the total votes cast. If any one candidate received over 50% of the votes, the program should print a message declaring that candidate the winner. If no candidate received 50% of the votes, the program should print a message declaring a run-off between the two candidates receiving the highest number of votes; the two candidates should be identified by their letter names. For testing, run the program with the above data, and also with another data file where Candidate C receives only 108 votes in precinct 4.
Join now or log in to start viewing answers.Report DMCA©Copyright 2000-2018. All Rights Reserved. TermPaperChampions.com: The most reliable provider of custom academic papers. Our writers are here to help you complete papers from all disciplines and academic levels . You can always trust us to deliver.
Get a 15 % discount on an order above $ 50Use the following coupon code :tpc15
READY TO PLACE AN ORDER