Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

FLOWCHART TO THIS PROGRAM...THIS IS A C language program #include #include #include #include struct library { char bk_name[30]; char arthur[30]; int pages; float price; };

FLOWCHART TO THIS PROGRAM...THIS IS A C language program

#include #include #include #include struct library { char bk_name[30]; char arthur[30]; int pages; float price; };

int main() { struct library l[3]; char ar_nm,bk_nm; int i,j;

printf ("1. Add book information 2. Display book information 3. List all books of given author 4. List the title of specified book 5. List the count of books in the library 6. Exit");

printf (" Enter one of the above : "); scanf("%d",&j);

switch (j) { case 1: for (i=0;i<3;i++) {

printf ("Enter book name = "); scanf ("%s",&l[i].bk_name);

printf ("Enter arthur name = "); scanf ("%s",&l[i].arthur);

printf ("Enter pages = "); scanf ("%d",&l[i].pages);

printf ("Enter price = "); scanf ("%f",&l[i].price); } break; case 2: printf("you have entered the following information "); for(i=0;i<3;i++) { printf ("book name = %s",l[i].bk_name);

printf ("arthur name = %s",l[i].arthur);

printf ("pages = %d",l[i].pages);

printf ("price = %f",l[i].price); } break;

case 3: printf ("Enter arthur name : "); scanf ("%s",&ar_nm); for (i=0;i<3;i++) { if (ar_nm == l[i].arthur) printf ("%s %s %d %f",l[i].bk_name,l[i].arthur,l[i].pages,l[i].price); } break;

case 4: printf ("Enter book name : "); scanf ("%s",&bk_nm); for (i=0;i<3;i++) { if (bk_nm == l[i].bk_name) printf ("%s %s %d %f",l[i].bk_name,l[i].arthur,l[i].pages,l[i].price); } break;

case 5: for (i=0;i<3;i++) {

} break; case 6: exit (0);

} return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions

Question

1. Explain the purpose of performance appraisal.pg 87

Answered: 1 week ago

Question

Question Can I collect benefits if I become disabled?

Answered: 1 week ago

Question

Question May I set up a Keogh plan in addition to an IRA?

Answered: 1 week ago