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 15:20
The north and south regions had very diferent economies in the 1800s.
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Which of the following factors would your hypothetical supervisor look at when deciding whether to test a biological material sample for dna? the amount of other evidence you have implicating a suspect in a crime the annual budget for the crime lab both of the above none of the above; you would almost always order a test
Answers: 3
question
Computers and Technology, 23.06.2019 20:50
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
question
Computers and Technology, 24.06.2019 14:30
In a home that has 120 v service, there is an electric appliance that has a resistance of 12 ohms. how much power will this appliance consume? a. 10 w b. 120 w c 1200 w d. 1440 w
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
Mathematics, 25.09.2020 06:01
question
Health, 25.09.2020 06:01
question
Mathematics, 25.09.2020 06:01
question
Mathematics, 25.09.2020 06:01
question
Arts, 25.09.2020 06:01
question
Mathematics, 25.09.2020 06:01
Questions on the website: 13722360