Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that allows the user to enter the last namesof five candidates i

ID: 3615623 • Letter: W

Question

Write a program that allows the user to enter the last namesof five candidates in a local election and the number of votesreceived by each candidate. The program should then outputeach candidate's name, the number of votes received, and thepercentage of the total votes received by the candidate. Yourprogram should also output the winner of the election. A sanmple output is: Candidate   Votes Received   %of Total Votes Johnson               5000                     25.91 Miller                  4000                     20.73 Duffy                   6000                     31.09 Ashtony               2500                     12.95 Total                    19300 The winner of the Election is Duffy. Please include everything listed above. If the programworks in visual studio. I will rate LIFESAVER!!!! Thank you very much. Write a program that allows the user to enter the last namesof five candidates in a local election and the number of votesreceived by each candidate. The program should then outputeach candidate's name, the number of votes received, and thepercentage of the total votes received by the candidate. Yourprogram should also output the winner of the election. A sanmple output is: Candidate   Votes Received   %of Total Votes Johnson               5000                     25.91 Miller                  4000                     20.73 Duffy                   6000                     31.09 Ashtony               2500                     12.95 Total                    19300 The winner of the Election is Duffy. Please include everything listed above. If the programworks in visual studio. I will rate LIFESAVER!!!! Thank you very much.

Explanation / Answer

please rate - thanks #include #include using namespace std; int sumVotes(int list[], int size); int winnerIndex(int list[], int size); int main() {string can[5]; int votes[5]={0,0,0,0,0},tot,i; for (i = 0; i < 5; i++)    {cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote