IN C LANGUAGE
PLEASE PUT COPYABLE CODE
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
In C language. Please don't copy similar programs from, bartleby or chegg
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 input is -30. Note: Each record has a number (1, 2, 3 ...),once the program scans record number -30, it should terminate without processing it.
SAMPLE RUN #4: ./Structures Interactive Session Show Invisibles Highlight:
Enter record number:1
Enter Make:Mercury
Enter Model:Sable
Enter Odometer Reading:99842
Enter Month:1 Enter Day:18
Enter Year:2001
Enter Month:5
Enter Day:30
Enter Year:1991
Enter Capacity:16
Enter Fuel Level:12.5
Make: Mercury Model: Sable Odometer: 99842 Manufacturer Date: 1/18/2001 Purchase Date: 5/30/1991 Tank Capacity: 16.00 Fuel Level: 12.50
Enter record number:-3
In C language. Please don't copy similar programs from, bartleby or chegg
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 input is -30. Note: Each record has a number (1, 2, 3 ...),once the program scans record number -30, it should terminate without processing it.
SAMPLE RUN #4: ./Structures Interactive Session Show Invisibles Highlight:
Enter record number:1
Enter Make:Mercury
Enter Model:Sable
Enter Odometer Reading:99842
Enter Month:1 Enter Day:18
Enter Year:2001
Enter Month:5
Enter Day:30
Enter Year:1991
Enter Capacity:16
Enter Fuel Level:12.5
Make: Mercury Model: Sable Odometer: 99842 Manufacturer Date: 1/18/2001 Purchase Date: 5/30/1991 Tank Capacity: 16.00 Fuel Level: 12.50
Enter record number:-3
- What are general controlsarrow_forwardC#arrow_forwardJava Language Create Clock class and demonstrate the features of the class with the driver program. upload a single file that contains the source code with documentation for both the clock class and the driver and execution of the program. The rule for execution is that you execute enough times with sufficient data that every line in the program is executed).arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY