i'm reading c++ how to program by paul deitel. im having some problem with ex 4.13. 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. Devel- op a C++ program that uses a while statement to input the 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.
This is what i have . something wrong with my code. pls help!
Your condition for the while statement on line#15 will be false, as 'trips' is equal to 0 and thus your code won't enter the while block and will simply go straight down to line#29