10.1) 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/0 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 Hide Invisibles Highlight: None Show Highlighted Only O Enter-record number:14 Enter Make: Mercurye 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+0dometer:-99842+→Manufacturer Date: 1/18/2001+Purchase Date: •5/30/1991+Tank• Capacity: 16.00- Fuel·Level:12.50- Enter record - number:-30-

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

IN C LANGUAGE

PLEASE PUT COPYABLE CODE

10.1) 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
Hide Invisibles
Highlight: None
Show Highlighted Only O
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.54
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:-30-
Transcribed Image Text:10.1) 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 Hide Invisibles Highlight: None Show Highlighted Only O 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.54 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:-30-
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

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

Solution
Bartleby Expert
SEE SOLUTION
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY