Answer to Question #25300 in C++ for Alexandra

Question #25300
Write a program that will ask the user for results of an election. There are 3 candidates that get votes. The program should ask, for each candidate: the name (without spaces) and the number of votes.Then the program should display the results in tabular format: name left justified, number of votes right justified, and percentage of votes right justified with 1 decimal,for each of the three candidates.At the end, display total votes.You can assume names are no longer than 8, and the number of votes in less than two thousand total.No input validation needed.Example (you should match the format)
Give name: John
Give votes: 200
Give name: Adam
Give votes: 750
Give name: Susan
Give votes: 50

John 200 20.0%
Adam 750 75.0%
Susan 50 5.0%
Total votes 1000
Hints - Follow incremental development with the following suggested increments:
1. Write program to read three names and three votes and just display name and votes
John 200
Adam 750
Susan 50
1
Expert's answer
2013-02-27T02:41:55-0500
Unfortunately, your question requires a lot of work and cannot be done for free.Submit it with all requirements as an assignment to our control panel and we'll assist you.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS