Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c++ program Section C Scenario-Based Question(s) 30 Marks Study the scenario and complete the question(s) that follow: Votes A program is required that captures names
c++ program
Section C Scenario-Based Question(s) 30 Marks Study the scenario and complete the question(s) that follow: Votes A program is required that captures names of candidates who participated in an election together with the votes they garnered. The program should display the inputs as well as calculated percentages of the total votes by each candidate. Bonyongwa T 2021) Question 4 Given that there were five candidates, write a program to capture the inputs as described in the scenario. Display the name, number of votes and the number of votes for each candidate as a percentage of the total votes. The program should also display the winning candidate using a function. Your output should be similar to this: (30 Marks) Provide name of candidate and number of votes Candidate: 1 Patric Votes Garnered : 65 Candidate: 2 Sue Votes Garnered : 54 Candidate : 3 Mo loe Votes Garnered : 123 Candidate : 4 Zak Votes Garnered : 78 Candidate: 5 Antonio Votes Garnered : 66 Total 386 Candidate Votes Garnered Patric 65 16.8394 54 13.9896 Moloe 123 31.8653 Zak 28 20.2073 Antonio 66 17.0984 The elections were won by candidate Moloe. Sue End of Section CStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started