subject

Write a program that allows the user to enter the last names of five candidates in a local election and the votes received by each candidate. the program should then output each candidate's name, votes received by that candidate, and the percentage of the total votes received by the candidate. your program should also output the winner of the election. sample output is as follows: candidate names number of votes recieved percentage of the total votes recievedjohnson 5000 25.91miller 4000 20.72duffy 6000 31.09robinson 2500 12.95sam 1800 9.33total 19300

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:00
Which of the following does 3d animation create an illusion of on the screen? a. depth b. emotion c. length d. dialogue
Answers: 1
question
Computers and Technology, 23.06.2019 03:10
Fill in the following program so that it will correctly calculate the price of the orange juice the user is buying based on the buy one get one sale.#include //main functionint main() { int cartons; float price, total; //prompt user for input information printf("what is the cost of one container of oj in dollars? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & price); printf("how many containers are you buying? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & cartons); if ( [ select ] ["cartons / 2", "cartons % 1", "cartons % 2", "cartons % price", "cartons / price", "cartons / total"] [ select ] ["=", "==", "! =", "< =", "> =", "< "] 0) total = [ select ] ["price * cartons", "cartons * price / 2 + price", "(cartons / 2) * price", "cartons / (2.0 * price)", "(cartons / 2.0) * price + price", "((cartons / 2) * price) + price"] ; else total = ((cartons / 2) * price) + price; printf("the total cost is $%.2f.\n", total); return 0; }
Answers: 2
question
Computers and Technology, 23.06.2019 13:00
Which of the following statements is false? a. a class can directly inherit from class object. b. if the class you're inheriting from declares instance variables as private, the inherited class can access those instance variables directly. c. a class's instance variables are normally declared private to enforce good software engineering. d. it's often much more efficient to create a class by inheriting from a similar class than to create the class by writing every line of code the new class requires.
Answers: 3
question
Computers and Technology, 23.06.2019 23:30
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
You know the right answer?
Write a program that allows the user to enter the last names of five candidates in a local election...
Questions
question
Mathematics, 10.10.2021 20:20
question
Mathematics, 10.10.2021 20:20
question
Mathematics, 10.10.2021 20:20
question
Mathematics, 10.10.2021 20:20
question
Mathematics, 10.10.2021 20:20
question
Mathematics, 10.10.2021 20:20
question
Health, 10.10.2021 20:20
question
Mathematics, 10.10.2021 20:20
Questions on the website: 13722361