subject

Drivers are concerned with the mileage obtained by their automobiles. One driver has kept track of several tankfuls of gasoline by recording miles driven and gallons used for each tankful. Develop a sentinel-controlled-repetition script that prompts the user to input the miles driven and gallons used for each tankful. The script should calculate and display the miles per gallon obtained for each tankful. After processing all input information, the script should calculate and display the combined miles per gallon obtained for all tankfuls (that is, total miles driven divided by total gallons used). Enter the gallons used (-1 to end): 128
Enter the miles driven: 287 The miles/gallon for this tank was 22.421875
Enter the gallons used (-1 to end): 10.3
Enter the miles driven: 200 The miles/gallon for this tank was 19.417475
Enter the gallons used (-1 to end): 5
Enter the miles driven: 120 The miles/gallon for this tank was 24.000000
Enter the gallons used (-1 to end): -1 The overall average miles/gallon was 21. 601423

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:30
Provide an example of a project that combines the three principles of lean six sigma with business project management (bpm) and services oriented architecture (soa). identify the elements of the project that comply with each of three principles.
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
question
Computers and Technology, 25.06.2019 04:00
Has anyone noticed that has been giving the wrong answers and that the ads are blocking answers or is that just me?
Answers: 2
question
Computers and Technology, 25.06.2019 04:20
Many prestigious universities have a system called a “legacy preference system” which is used to decide which applicants should be accepted to the university. if an applicant’s parent is an alumnus of the university, the applicant will be admitted with lower gpa and sat scores than if the parent is not an alumnus. (there is currently a lot of discussion about the fairness of this system, but universities get a lot of money from their alumni so they are unwilling to change ) your assignment for mp2 is to implement a computerized system like this for a very small prestigious university. the university has two schools, liberal arts and music, each with their own criteria for accepting students. your program must read in certain information about an applicant and print a message saying whether the applicant should be accepted or not.
Answers: 2
You know the right answer?
Drivers are concerned with the mileage obtained by their automobiles. One driver has kept track of s...
Questions
question
English, 01.12.2021 04:00
Questions on the website: 13722363