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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started