Question: C++: Write a program that takes the user input of a number of cars' information including their model, make and year. The input starts with
C++: Write a program that takes the user input of a number of cars' information including their model, make and year. The input starts with an integer indicating the number of cars that will follow. Each car's information is entered in a separate line. The model, make, and year information of each car are separated by whitespaces. You can safely assume that the number of cars is no more than 10. The following shows an example input
Define a structure, named CarInfo, that contains three member variables, Make (a string), Model (a string), and Year (an integer). Write a program that takes the user input of a number of cars' information including their model, make and year. The input starts with an integer indicating the number of cars that will follow. Each car's information is entered in a separate line. The model, make, and year information of each car are separated by whitespaces. You can safely assume that the number of cars is no more than 10. The following shows an example input 3 Nissan Versa 2012 Ford Explorer 2020 Nissan Sentra 2020 (1) The program then outputs the car information received. For example, given the above input, the program will output You entered: Nissan Versa 2012 Ford Explorer 2020 Nissan Sentra 2020 (2) Next, the program will get a year (integer) from the user and print all cars made during or after that year. For example, if the integer entered is 2020, given the input above the output would be: Cars produced after 2020 in inventory: Ford Explorer 2020 Nissan Sentra 2020 If no car is found, print the message: No car produced after
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts

