subject

Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles. Ex: If the input is 20.0 3.1599, the output is: 1.57995 7.89975 63.198 Note: Small expression differences can yield small floating-point output differences due to computer rounding. Ex: (a + b)/3.0 is the same as a/3.0 + b/3.0 but output may differ slightly. Because our system tests programs by comparing output, please obey the following when writing your expression for this problem. First use the dollars/gallon and miles/gallon values to calculate the dollars/mile. Then use the dollars/mile value to determine the cost per 10, 50, and 400 miles. Note: Real per-mile cost would also include maintenance and depreciation. (Need Coral answer version/ Not Python. )

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:30
1. before plugging in a new device to a computer you should unplug all other devices turn off the computer turn on the computer 2. many of the maintenance tools for a computer can be found in the control panel under administrative tools display personalization
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
An english teacher would like to divide 8 boys and 10 girls into groups, each with the same combination of boys and girls and nobody left out. what is the greatest number of groups that can be formed?
Answers: 2
question
Computers and Technology, 23.06.2019 23:00
Computer programming is one type of what career
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
How can you make your column headings stand out?
Answers: 1
You know the right answer?
Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats)...
Questions
question
Engineering, 13.11.2020 22:30
question
Mathematics, 13.11.2020 22:30
question
Mathematics, 13.11.2020 22:30
question
Social Studies, 13.11.2020 22:30
question
Mathematics, 13.11.2020 22:30
Questions on the website: 13722360