Question: Write a program that keeps track the votes that each candidate received in a local election. The program should output each candidates name, the number
Write a program that keeps track the votes that each candidate received in a local election. The program should output each candidates 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. To solve this problem, you will use two dynamic arrays to keep track the votes and candidate names. You will ask user for number of candidates, then create two parallel dynamic arrays, votes and candidates to keep track the votes for each candidate, and the names of each candidate. The programs will allow user to enter the last name of each candidate, and the number of votes each candidate received. The program should then output the summary of the voting result. You can design the necessary functions in your program to accomplish the tasks.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
