Question: write a function named bestMileage() we are starting with structures, streams and vectors. any help is appreciated 7 THE bestMileage PROBLEM Using the Car structure
write a function named bestMileage()
we are starting with structures, streams and vectors. any help is appreciated

7 THE bestMileage PROBLEM Using the Car structure defined in file p1.cpp, taken from the 2017 EPA testing results, write the function named bestMileage(). The function takes one input parameter: a vector of Cars that represents the testing data. The vector is sorted by manufacturer, so all cars of a particular manufacturer are together in the vector. The function also has an output parameter, a vector of string that contains both the manufacturer and the model concatenated together, separated by a semicolon, like this: "BMW;430i Coupe" Each entry is the car with the best mileage from each manufacturer. The function returns the average mileage of the selected cars. vector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
