二手书管理系统简历怎么写

# include # includestructBook { char number[15];char writer[10];charname[50];};void eatline(){ charch;while((ch=getchar())!='\n ')继续;}intaddbook(Book*b,int*n){puts("请输入ISBN:");获取(b[*n]。号);Puts("请输入作者:");获取(b[*n]。作家);Puts("请输入标题:");获取(b[*n]。姓名);* n = * n+1;return0}intdeletebook(Book*b,int * n){ chars[50];inti,j,flag = 0;Puts("请输入你要删除的书名:");获取;for(I = 0;我& lt* n;i++){if(strcmp(b[i])。name,s)= = 0){ for(j = I;j & lt* n-1;j++){strcpy(b[j].编号,b[j+1]。号);strcpy(b[j].writer,b[j+1]。作家);strcpy(b[j].姓名,b[j+1]。姓名);} flag = 1;}}if(flag==1){puts("本书已删除!!!");* n = * n-1;return0}else{puts("你要删除的书不存在!!!");return 1;}}intsearch(Book*b,intn,char * str){ inti;for(I = 0;我& ltn;I++) {if (strcmp (b [I])。name,str) = = 0) {printf("书号:% s \作者:% s \ n标题:% s \ n ",b [I]。号,b [I]。Writer,b[returni;}}printf("没有你要找的书\ n ");return-1;}intmodifym(Book*b,int * n){ charnu[15];charw[10];charna[50];intflagPuts("请输入你要修改的书名:");gets(na);If ((flag = search (b,* n,na)) =-1) {printf("您要修改的书不存在!!!\ n ");return-1;}else{puts("请输入新的ISBN:");While (gets (nu),strcmp (nu," ")= = 0) {puts("您的输入有误,请重新输入:");}puts("请输入新作者:");While (gets (w),strcmp (w," ")= = 0) {puts("您的输入有误,请重新输入:");}puts("请输入新标题:");While (gets (na),strcmp (na," ")= = 0) {puts("您的输入有误,请重新输入:");}strcpy(b[flag]。号,nu);strcpy(b[flag].作家,w);strcpy(b[flag].姓名,na);return0} } void print menu(){ printf(" \ t \ t 1,添加图书信息\ n ");Printf("\t\t2,查询图书信息\ n ");Printf("\t\t3,删除图书信息\ n ");Printf("\t\t4,修改图书信息\ n ");Printf("\t\t5,打印图书信息\ n ");Printf("\t\t0,退出系统\ n ");}intprintmessage(Book*b,intn){ inti;for(I = 0;我& ltn;i++){ printf(" ISBN:");puts(b[i]。号);Printf("作者:");puts(b[i]。作家);printf(" Title:");puts(b[i]。姓名);} return0} int main(){ book book[50];charstr[20];intn=0,标志;print menu();while(scanf("%d ",& amp旗),旗!= 0){ eat line();switch(flag){ case 1:addbook(book & amp;n);打破;Case2:printf("请输入你要找的标题:");gets(str);search(book,n,str);打破;情况3:删除一本书。n);打破;情况4:modifym(书& ampn);情况5:printmessage(book,n);打破;默认:break} print menu();} return0}