so...ummm....there was absolultly no problem with the for loop...it just had to be done differently in order to change the number each time.
Code:
printf ("\nEnter the number of gallons used for tank #%d: ",gallused);
And then the very last statement of the for loop should be something along these lines
Code:
avg = avg+gallons_used;
or
Code:
avg += gallons_used;
which is actually the same thing but thats another lesson.
Then, just before you print the overall average, you need to divide the avg by three.
Also, don't forget that you need to initiate avg as 0.0 at the beginning of the program.