Question: 2. Write a C++ program that declares a structure named Car and has the following data elements: Manufacturer string with a maximum of 25 characters
2. Write a C++ program that declares a structure named Car and has the following data elements: Manufacturer string with a maximum of 25 characters long Model Year : string with a maximum of 25 characters long : Integer : Integer : Double . Mileage Price The program should create an array of the Car structure with 4 element:s The array should be called CarList and should have 4 elements The program should store the following data in the array: - - Manufacturer Model Year Mileage Price Car 1 Toyota Car 2 Honda Car 3 Ford Car 4 Toyota Camry Pilot Focus Corola 2017 17000 15299.99 2014 58000 8799.99 2015 34234 6799.99 2013 97000 5289.99 The program should ask the user to specify one of the four cars then display its information. For example, display a message saying "Please enter the car number (from 1 to 4)" and if the user enters 4, the program displays the information for Car 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
