this is data structures with C++ language, please do \"#1 & a\" separately and please send...

70.2K

Verified Solution

Question

Programming

this is data structures with C++ language, please do \"#1 &a\" separately and please send me copyable file

1. Write a program that allows the user to enter the last namesof the candidates in a local election and the votes received byeach candidate. The program should then output each candidate'sname, votes received by that candidate, and the percentage of thetotal votes received by the candidate. Assume a user enters acandidate's name only once and assume that no two candidatesreceive the same number of votes. Your program should output thewinner of the election.

a. Modify your work, above question solution as follows:

replace the int array with a double vector

the winner gets at most 20% of the loser's assets

the loser withdraws from the game if its assets are less than1.00. In this case the winner gets all of the loser's assets.

Answer & Explanation Solved by verified expert
4.1 Ratings (480 Votes)
include include using namespace std int findWinnerint votes    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students