Please help!

Write your question here.
_I'm trying to figure out how to do this. How would you go about and write pseudocode for this? I'm really new at this , I don't know how to begin
Gas Mileage) Drivers are concerned with the mileage obtained by their automobiles. One driver has kept track of several trips by recording miles driven and gallons used for each trip. The program should calculate and display the miles per gallon obtained for each trip and print the combined miles per gallon obtained for all tankfuls up to this point.
 
I'd start by figuring out what data needs to be collected and what I need to do with that data and when.

One driver has kept track of several trips by recording miles driven and gallons used for each trip.


I'm going to need to collect information on multiple trips, so that tells me I'll probably want to use some sort of loop structure to collect the info.

The program should calculate and display the miles per gallon obtained for each trip


In that same loop, I need do a calculation on the information just entered, and print out the result.

print the combined miles per gallon obtained for all tankfuls up to this point.


This tells me I need to accumulate totals with each iteration of the loop. So in addition to printing out the calculation of the data just entered in the current iteration of the loop, I need to do the same calculation on the total miles and gallons entered so far through all the iterations up to this current one.
Topic archived. No new replies allowed.