(JAVA) Write a program that allows the user to enter the last names of five candidates in a local election and the number of votes received by each candidate. The program should then output each...


(JAVA) Write a program that allows the user to<br>enter the last names of five candidates in a<br>local election and the number of votes<br>received by each candidate. The program<br>should then output each candidate's name, the<br>number of votes received, and the percentage<br>of the total votes received by the candidate.<br>Your program should also output the winner of<br>the election. A sample output is:<br>Votes<br>% of Total<br>Candidate<br>Received<br>Votes<br>Johnson<br>5000<br>25.91<br>Miller<br>4000<br>20.73<br>Duffy<br>6000<br>31.09<br>Robinson<br>2500<br>12.95<br>Ashtony<br>1800<br>9.33<br>Total<br>19300<br>The Winner of the<br>Election is Duffy<br>

Extracted text: (JAVA) Write a program that allows the user to enter the last names of five candidates in a local election and the number of votes received by each candidate. The program should then output each candidate's name, the number of votes received, and the percentage of the total votes received by the candidate. Your program should also output the winner of the election. A sample output is: Votes % of Total Candidate Received Votes Johnson 5000 25.91 Miller 4000 20.73 Duffy 6000 31.09 Robinson 2500 12.95 Ashtony 1800 9.33 Total 19300 The Winner of the Election is Duffy

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here