Answer to Question #29543 in Action Script | Flash | Flex | ColdFusion for lovedonia

Question #29543
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
0
Expert's answer

Answer in progress...

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
New on Blog
APPROVED BY CLIENTS