Question: A sample of the output is given below: Enter the make: Mercury Enter the model: Sable Enter the odometer: 99842 Enter the tank capacity: 16

 A sample of the output is given below: Enter the make:

A sample of the output is given below:

Enter the make: Mercury Enter the model: Sable Enter the odometer: 99842 Enter the tank capacity: 16 Enter the fuel level: 12.5 We now need to enter the manufacture date. Enter the month: 5 
Enter the day: 30 Enter the year: 1991 We now need to enter the purchase date. Enter the month: 1 Enter the day: 18 Enter the year: 2001 
Vehicle Information: Make: Mercury Model: Sable Odometer: 99842 miles Tank Capacity: 16 gallons Fuel Level: 12.5 gallons Manufacture Date: 5/30/1991 Purchase Date: 1/18/2001 
Do you want to enter another automobile (y)? y 
Enter the make: Mazda Enter the model: Navajo Enter the odometer: 123961 Enter the tank capacity: 19.3 Enter the fuel level: 16.7 We now need to enter the manufacture date. Enter the month: 2 Enter the day: 20 Enter the year: 1993 We now need to enter the purchase date. Enter the month: 6 Enter the day: 15 Enter the year: 1993 
Vehicle Information: Make: Mazda Model: Navajo 

5

Odometer: 123961 miles Tank Capacity: 19.3 gallons Fuel Level: 16.7 gallons Manufacture Date: 2/20/1993 Purchase Date: 6/15/1993 
Do you want to enter another automobile (y)? n Good bye! 

*******THIS SHOULD BE DONE IN C CODE, NOT C++*******

5 Automobile (20 Points) Name the project: automobile We are interested in writing a program that asks the user specific information about a vehicle. The program should then print all the information and repeat this process until the user indicates the he/she is done entering information. Asking the user at the end whether or not to enter another automobile will be sufficient. The information will be stored in several structures: auto_t and date_t. The structure date_t will contain the month, day, and year (as integers). The structure auto_t will contain the make and model (as strings), the odometer reading (as an int), the tank capacity and current fuel level (as doubles) and the manufacture and purchase dates (as date_t) You will be asked to write several functions. scan_date should have a parameter of type date_t and ask the user for the month, day, and year. scan_auto should have a parameter of type auto_t and ask the user to enter the make, model, odometer, tank capacity, and fuel level. It also needs ask for the manufacture and purchase dates by calling scan_date. For simplicity purposes, we will assume that the user enters valid dates 4 Once all the data has been entered, the program needs to print the information. print_date should print the data corresponding to some date_t, and print_auto should print the data corresponding to some auto_t

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!