Question: 5. Define a struct, carType, to store the following data about a car: Manufacturer(string), model (string), model type (string), color (string), number of doors (int),



5. Define a struct, carType, to store the following data about a car: Manufacturer(string), model (string), model type (string), color (string), number of doors (int), miles per gallon in city (int), miles per gallon on highway (int), year when the car was built (int), and the price (double). Consider the declaration of the struct houseType given in Chapter 9 of your textbook. Write C++ statements to do the following: 6. a) Declare variables oldHouse and newHouse of type houseType b) Store the following information into oldHouse: style -Two-story, number of bedrooms - 5, number of bathrooms - 3, number of cars in garage -4, year built 1975, finished square footage 3500, price - 675,000, and tax 12500 c) Copy the values of the components of oldlouse into the corresponding components of newllouse
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
