The first task is to ask the user for the data. The variable names have already been decided, so this part of the program is:
'Ask the user for the data. PRINT "Enter the first odometer reading" INPUT FIRSTMILES ' PRINT "Enter the second odometer reading" INPUT SECONDMILES ' PRINT "Enter the first gallons" INPUT GALLONS1 ' PRINT "Enter the third odometer reading" INPUT THIRDMILES ' PRINT "Enter the second gallons" INPUT GALLONS2
The miles-per-gallon for the first tank of gas
can now be calculated.
The miles traveled on the first tank of gas
is the difference between the second and the first odometer reading.
The gallons burned is, GALLONS1
, the gallons used when the
tank is first refilled.
Fill in the QBasic statement that calculates the MPG for the second tank of gas.
(Type your answer in the box privided, or just write it on a scrap of paper.)