Machine Problem No. 1 The results from the mayor's race have been reported by each precinct as follows: Candidate Candidate Candidate Candidate Precincts A В 1 192 48 206 37 2 147 90 312 21 3 186 12...


please help me code this in C programming language. provide the answer in text so I can copy-paste it. also makes sure its working. I give a thumbs up


Machine Problem No. 1<br>The results from the mayor's race have been reported by each precinct as follows:<br>Candidate<br>Candidate<br>Candidate<br>Candidate<br>Precincts<br>A<br>В<br>1<br>192<br>48<br>206<br>37<br>2<br>147<br>90<br>312<br>21<br>3<br>186<br>12<br>121<br>38<br>4<br>114<br>21<br>408<br>39<br>5<br>267<br>13<br>382<br>29<br>Write a program to do the following:<br>a. Print out the table with the appropriate headings for the rows and columns.<br>b. Compute and print the total number of votes received by each candidate and the<br>percent of the total votes cast.<br>c. If any one candidate received over 50 percent of the total votes, the program should<br>print a message declaring that candidate the winner.<br>d. If no candidate received 50 percent of the votes, the program should print a message<br>declaring a run-off between the two candidates who received the highest number of<br>votes; two candidates should be identified by their letter names.<br>e. Run the program once with the preceding data and once with candidate C receiving<br>only 108 votes in precinct 4. (note: test values are not limited to the preceding data)<br>Note: Use Array for this machine problem<br>

Extracted text: Machine Problem No. 1 The results from the mayor's race have been reported by each precinct as follows: Candidate Candidate Candidate Candidate Precincts A В 1 192 48 206 37 2 147 90 312 21 3 186 12 121 38 4 114 21 408 39 5 267 13 382 29 Write a program to do the following: a. Print out the table with the appropriate headings for the rows and columns. b. Compute and print the total number of votes received by each candidate and the percent of the total votes cast. c. If any one candidate received over 50 percent of the total votes, the program should print a message declaring that candidate the winner. d. If no candidate received 50 percent of the votes, the program should print a message declaring a run-off between the two candidates who received the highest number of votes; two candidates should be identified by their letter names. e. Run the program once with the preceding data and once with candidate C receiving only 108 votes in precinct 4. (note: test values are not limited to the preceding data) Note: Use Array for this machine problem

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here