The results from the mayor's race have been reported by each precinct as follows: Precinct Candidate-A Candidate-B Candidate-C Candidate-D 1. 192 48 206 37 2. 147 90 312 21 3. 186 12 121 38 4. 114 21 408 39 5. 267 13 382 29 Write a program to do the following: a. Read the raw vote totals from a data file that contains one row for each precinct. b. Display the table with appropriate headings for the rows and columns. c. Compute and display the total number of votes received by each candidate and the percent of the total votes cast. d. If any one candidate received over 50% of the votes, the program should print a message declaring that candidate the winner. e. If no candidate received 50% of the votes, the program should print a message declaring a run-off between the two candidates receiving the highest number of votes; the two candidates should be identified by their letter names. f. For testing, run the program with the above data, and also with another data file where Candidate C receives only 108 votes in precinct 4.

This question is marked "community wiki".

asked 13 Aug '15, 03:04

Sazzad's gravatar image

Sazzad
112

closed 15 Aug '15, 08:36

tahmidrafi's gravatar image

tahmidrafi ♦♦
1.1k214

দয়া করে আপনার Assignment করে দেয়ার অনুরোধ করবেন না। আপনি চেষ্টা করতে থাকুন যেখানে সমস্যা হয় পোস্ট করুন। আমরা সাহায্য করব। এই কমুইনিটিতে পুরো Assignment করে দেওয়ার নিয়ম নেই। আর আমরা সম্পূর্ণ প্রব্লেম সল্ভ করে দিলে আপনি কি শিখবেন?

(13 Aug '15, 04:56) Kaiser Ahmed

The question has been closed for the following reason "Question is off-topic or not relevant" by tahmidrafi 15 Aug '15, 08:36

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×70
×4

question asked: 13 Aug '15, 03:04

question was seen: 748 times

last updated: 15 Aug '15, 08:36