67 069
Assignments Done
99,3%
Successfully Done
In November 2018

Answer to Question #29329 in C++ for thabang wilson

Question #29329
Suppose the South African Football Association (SAFA) runs a competition in which a spectator has to be chosen from three candidates and suppose there are 4 voting stations. We need a C++ program that will count the votes for every candidate and display the result. At every voting station the voters have to be asked one after the other for which candidate (indicated by (C)hiefs or (B)uccaneer or (P)latinum Stars) he or she wants to vote for. ZZZ is entered when all the voters at the specific voting station have voted.
The program has the following structure
• The three totals and the number of spoilt votes are initialised to 0
• Now a for loop follows, going from one (1) to the number of voting stations
• Inside the loop is a while loop. A prompting message appears on the screen, asking the voter for which candidate he or she wants to vote. The choice of the voter is then input
• Inside the while loop is a switch statement to increment the correct total. The default option is used to count the number of spoilt votes
• The while loop is exited when ZZZ is entered for the choice
• When the for loop is exited, the three totals, the number of spoilt votes and the winning total are displayed
Expert's answer
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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions