Question: Please solve. Thanks in advance. Juan wants a program that calculates and displays the number of miles per gallon he drove his car on a
Please solve. Thanks in advance.
Juan wants a program that calculates and displays the number of miles per gallon he drove his car on a recent trip. When he started the trip, the cars gas tank was full and its odometer read 5500. Before reaching his final destination, Juan stopped at two different gas stations to purchase gas. At the first stop, he purchased 15.5 gallons of gas; at that time, the odometer read 5860. At the second stop, he purchased 18.7 gallons of gas; at that time, the odometer read 6280. First, create an IPO chart for this problem. Although specific values are provided for the odometer readings and gallons of gas, do not use named constants for those values. After creating the IPO chart, desk-check the algorithm twice. For the first desk-check, use the values provided in this exercise. For the second desk-check, use your own set of data. After desk-checking the algo- rithm, list the input, processing, and output items in a chart similar to the one shown in Figure 3-25, and then enter the appropriate C++ declaration statements.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
