i am ask to write a program that calculates miles per gallon for a list of cars. The data for each car consists of initial odometer reading, and a number of gallons of gas. The user signals that there are no more cars by entering a negative initial odometer reading.
the console output must look like this:
Miles Per Gallon Program
Initial miles:
15000
Final miles:
15250
Gallons
10
Miles per Gallon: 25.0
Initial Miles:
107000
Gallons
15
Miles per Gallon:30.0
Initial miles:
-1
bye
i hope somebody can help me
the console output must look like this:
Miles Per Gallon Program
Initial miles:
15000
Final miles:
15250
Gallons
10
Miles per Gallon: 25.0
Initial Miles:
107000
Gallons
15
Miles per Gallon:30.0
Initial miles:
-1
bye
i hope somebody can help me