Program that reads a local election result

Assignment Help Business Management
Reference no: EM132265467

Please write C++ program that reads a local election result file (called "votes.txt"):

Johnson   5000

Miller        4000

Duffy        6000

Robinson  2500

Anthony   1800

(note: the number 5 in the first row is the number of candidates)

The program should use array(s) to store the information, manipulate the data, then output each candidate's name, the number of votes received, and the percentage of the total votes received by the candidate to a local file called "result.txt" with the following format:

Candidate         Votes Received         % of Total Votes

Johnson            5000                          25.91

Miller                 4000                          20.73

Duffy                 6000                          31.09

Robinson           2500                         12.95

Anthony            1800                          9.33

Zip your source code (.cpp file(s)), input file ("votes.txt"), and output file ("result.txt") in a zip file and name it FirstName_LastName_Lab1.zip. Submit this zipped file here when ready.

Reference no: EM132265467

Questions Cloud

Scientific american by martin gardner : Write program to implement the simulation of life as described in Scientific American by Martin Gardner. The program will be implemented on a two dimensional
Why nutrition is a central component in health promotion : Discuss why nutrition is a central component in health promotion. What are some of the nutritional challenges for emerging population?
Determine which number is the smallest : Determine which number is the smallest. Print that number along with some descriptive text to inform the user of what is being printed to the screen.
Describe market skimming and penetration pricing strategies : Describe market skimming and penetration pricing strategies? Discuss objectives that each strategy hopes to achieve. What is dumping and price fixing.
Program that reads a local election result : Please write C++ program that reads a local election result file (called "votes.txt"):
How do race and ethnicity influence health for the group : Using health information available from Healthy People, the CDC, and other relevant government websites, analyze the health status for this group.
What are the basic data definition commands : What are some of the things you can accomplish with a data definition command?
Write your statement of personal and professional belief : UCSP 615 - Orientation to Graduate Studies at UMUC - University of Maryland University College - reflect on because your response may provide valuable insights
Write the function named enternewpassword : Write the function named enterNewPassword. This function takes no parameters. It prompts the user to enter a password until the entered password

Reviews

Write a Review

Business Management Questions & Answers

  Bonuses worker wages and benefits

How much should the government try to control compensation CEO salaries and bonuses worker wages and benefits?

  Two types of database technologies

Support your answer with decision support examples in the context of a typical chain of supermarkets. (a) Transactional databases (b) Data Warehouses

  Reason mao zedong was a bad leader

Provide three separate reasons (with referenced examples) to justify the reason Mao Zedong was a bad leader.

  Mean and standard deviation of the number

The probability that an individual is left handed is .15 IN a class of 70 students what is the mean and standard deviation of the number of left handers.

  Deliver great customer service

What do organizations have to do to get employees to deliver great customer service?

  What is pepsicos future outlook from your perspective

Conduct a Porter's Five Forces analysis of the non-alcoholic beverage industry. What is PepsiCo's future outlook from your perspective?

  Students question about managementsupposed a person likes

students question about managementsupposed a person likes things organized in a timely manner and strives for

  Leading change-why transformation efforts fail

Research and review John Kotter's article "Leading Change: Why Transformation Efforts Fail." Briefly discuss the eight steps identified and apply them to a project that you have worked on in the past. How would following these steps have changed t..

  Enterpreneurs and are producing hats and scarfs

Tom and Jerry are both enterpreneurs and are producing hats and scarfs. Tom is producing 1 hat and 3 scarfs per hour whereas Jerry is currently producing 2 hats and 5 scarfs per hour. Now they want to increase their production and exports as well...

  Web server performs its basic functions

Define how a Web server performs its basic functions. Include an example of the types of client requests made by a typical Web site visitor. Next, describe the difference between centralized and decentralized Web server architecture.

  Product rather than offer a price-off coupon

Why wouldn't a producer of toothpaste just lower the price of its product rather than offer a price-off coupon?

  Important information about research question

Assistance in creating research questions and hypotheses related to African American Male achievement gap

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd