please answer
Posted: Sat May 14, 2022 7:07 pm
please answer
Q4: Create a data structure named Car that contains three public fields: model year, kilometers per liter, and top speed a. Write a program that declares a Car. Assign values to the car's data fields, and display the values with explanation. Save the file as Car.cpp b. Modify the program to prompt the user for values of the fields, and display with explanation, also showing how old is the car. Save the file as Car2.cpp
Q4: Create a data structure named Car that contains three public fields: model year, kilometers per liter, and top speed a. Write a program that declares a Car. Assign values to the car's data fields, and display the values with explanation. Save the file as Car.cpp b. Modify the program to prompt the user for values of the fields, and display with explanation, also showing how old is the car. Save the file as Car2.cpp