Explore BrainMass

C++ program to calculate and display election results

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

I need help with the following program. I have an attachment with the code written. I just need the code added to where the info can be read in from a file.

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. The program should also output the winner of the election.

© BrainMass Inc. brainmass.com March 21, 2019, 6:04 pm ad1c9bdddf