Here's the task at hand, why it really matters to have the user enter the number of trips in a for loop is beyond me, seems like wasted code. Any help would be greatly appreciated:
Write a Java program that calculates a user’s gas mileage. Ask the user how many trips he/she took in his/her car. Write a For Loop that asks the user two questions for each trip: how many miles the trip was (as a decimal number), and how many gallons of gas were used (as a decimal number). After the user has entered this information for each trip, calculate his/her total gas mileage and print it to the screen. The gas mileage can be calculated by dividing the total miles driven by the total number of gallons of gas used.