C++ Election Day Write a program that compiles the result of an election. You will read the candidate last names from ballot.txt(also provided with the starter code). The ballot can have up to 10 people on it. For each candidate, prompt the user for the total number of votes they got in the election. You should calculate the total votes cast and the % of the vote each candidate earned. Display to the console a report showing the candidate name, the number votes received, and the percent of the total vote. You should also display the total votes cast and the winner. INPUT VALIDATION: Make sure the votes cast is greater than or equal to 0, and that it is a number. Sample output:
C++
Election Day
Write a program that compiles the result of an election. You will read the candidate last names from ballot.txt(also provided with the starter code). The ballot can have up to 10 people on it. For each candidate, prompt the user for the total number of votes they got in the election. You should calculate the total votes cast and the % of the vote each candidate earned. Display to the console a report showing the candidate name, the number votes received, and the percent of the total vote. You should also display the total votes cast and the winner.
INPUT VALIDATION: Make sure the votes cast is greater than or equal to 0, and that it is a number.
Sample output:
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images