Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please, no spam answers. You are to create a program that can be used for keepin

ID: 3813805 • Letter: P

Question

Please, no spam answers.

You are to create a program that can be used for keeping track of textbooks required and recommended for classes and the cost of those textbooks.

All input will be taken from standard input. Each line of input will begin with a single or double character code that identifies the type of operation that line describes. The possible line formats are listed in the image below.

Please test all formats that are listed in instruction and that they work. I added also a test.txt(well it's not in at .txt yet but you can copy and paste the test into a .txt and then run to test the formats of each input) that is displayed at the end of the guideline. (something like ./main < test.txt) in the terminal.

TEST data that can be used to test each of the input formats:

B 1234567890123 Programming for Pros
B 1234567890124 Programming for Dummies
B 1234567890125 Programming for Pets
D 1234567890123 D 02/2017
D 1234567890123 A King of Stupid
D 1234567890123 E 5
D 1234567890124 D 05/2017
D 1234567890124 A Ray
D 1234567890124 E 2
D 1234567890125 D 03/2017
D 1234567890125 A James
D 1234567890125 E 3
M 1234567890123 1 N
M 1234567890123 1 U
M 1234567890123 1 R
M 1234567890123 1 E
M 1234567890124 1 N
M 1234567890124 1 U
M 1234567890124 1 E
M 1234567890124 1 R
M 1234567890125 1 N
M 1234567890125 1 U
M 1234567890125 1 R
M 1234567890125 1 E
C ECEC 215 Programming Studio
C ECEC 111 Unix Testing
A 1234567890123 ECEC 215 501 R
A 1234567890123 ECEC 215 502 R
A 1234567890123 ECEC 215 503 R
A 1234567890124 ECEC 213 604 R
A 1234567890124 ECEC 213 607 R
A 1234567890124 ECEC 213 603 R
A 1234567890125 ECEC 215 501 R
A 1234567890125 ECEC 215 502 R
A 1234567890125 ECEC 215 503 R
GC ECEC 215
GS ECEC 215 504
GC ECEC 111
GS ECEC 111 605
GB 1234567890123
GB 1234567890124
GB 1234567890125
PB
PC
PY 02/2017
PY 05/2017
PD ECEC
PM ECEC

You are to create a program that can be used for keeping track of textbooks required and recommended for classes and the cost of those textbooks. All input will be taken from standard input. Each line of input will begin with a single or double character code that identifies the type of operation that line describes. The possible line formats are: B

Explanation / Answer

#include void main() { struct date { int day; int month; int year; }; struct details { char name[20]; int price; int code; int qty; struct date mfg; }; struct details item[50]; int n, i; printf("Enter number of items:"); scanf("%d", &n); fflush(stdin); for (i = 0; i