According to its documentation, the 2021 MINI Cooper gets 28 mpg in the city and 38 mpg on the highway. Write a program to compute the total cost of gasoline used during your most recent trip. In main(), prompt the user for two floats: a) total miles driven and b) percentage of total miles driven on a highway. Be sure to validate user input: total miles driven should be positive, and percentage spent in highway driving should be a value between 0 and 100. main() should prompt the user for new trip data until user is done. main()is also responsible for displaying the trip information.

Solved
Show answers

Ask an AI advisor a question