Question
C++ Program Write a program in C++ to determine the miles per gallon of a car. Create an array of five strings. The strings will
C++ Program
Write a program in C++ to determine the miles per gallon of a car.
Create an array of five strings. The strings will have five different types of cars: Sports Coupe, Sedan, SUV, Minivan, and Pickup
Create an array to hold the number of miles each of the types of cars can drive on a full tank
Create another array to hold the number of gallons each type of car can hold in its tank
Create an array to hold the miles per gallon for each car based on the previous two procedures by total number of miles / total number of gallons
Determine and display the type of car with the lowest miles per gallon and the its actual miles per gallon value
Determine and display the type of car with the highest miles per gallon and the its actual miles per gallon value
Documentation of your program
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started