Question: ONLY CODE IN C LANGUAGE PLEASE Define a structure type auto_t to represent an automobile. Include components for the make and model (strings), the odometer

ONLY CODE IN C LANGUAGE PLEASE

Define a structure type auto_t to represent an automobile. Include components for the make and model (strings), the odometer reading, the manufacture and purchase dates (use another user-defined type called date_t ), and the gas tank (use a user-defined type tank_t with components for tank capacity and current fuel level, giving both in gallons).

Write I/O functions scan_date , scan_tank , scan_auto , print_date , print_tank , and print_auto , and also write a driver function that repeatedly fills and displays an auto structure variable until EOF is encountered in the input.

Sample Execution

Input

Enter make: Mercury

Enter Model: Sable

Odometer reading: 99842

Enter manufacture date

Enter month: 1

Enter day of the month:18

Enter year:2001

Enter purchase date

Enter month: 5

Enter day of the month: 30

Enter year: 1991

Enter tank capacity in gallons:16

Enter current fuel level in gallons: 12.5

Output

Automobile details:

Make: Mercury

Model: Sable

Odomoter reading: 99842

Manufacture date: 18/01/2001

Purchase date: 30/05/1991

Tank capacity: 16.00 gallons

Current fuel: 12.50 gallons

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!