Answer:

SECONDMILES

Variable Names

Of course, other names are equally nice. Here is a list of names for the values that the user enters:

  1. FIRSTMILES — The odometer reading at the start.
  2. SECONDMILES — The second odometer reading
  3. GALLONS1 — The gallons of gas needed to fill the tank.
  4. THIRDMILES — The third odometer reading
  5. GALLONS2 — The gallons of gas used to fill the tank again.

Later on you will need variables for the two miles per gallon rates.

Now that the variable names have been decided, the first task, asking the user for the data, is just a sequence of PRINT and READ statements.

QUESTION 6:

Write the QBasic statments that complete the first task. Ask the user to enter each of the above quantities.