【正文】
*p。printf(Please input book name\n)。printf(name:)。scanf(%s,sname)。p=head。while (p!=NULL){ if (strcmp(pname,sname)==0){printf( name price publshier\n)。printf(Book Found: %s % %s\n,pname,pprice,ppub)。printf(\n\t\tPress any keys!)。getch()。return。}p=plink。}printf(Book Not Exist!\n)。printf(\n\t\tPress any keys !)。 getch()。}/*******************************************************//* 函數(shù)功能:結點刪除 *//* 輸入?yún)?shù):鏈表頭指針 *//* 函數(shù)輸出:返回鏈表頭指針 *//*******************************************************/struct node *del(struct node *head){char sn[15],s。int flag=0。struct node *p,*q。printf(Please input book name\n)。printf(name:)。scanf(%s,sn)。p=head。while(p!=NULL){while(p!=NULL amp。amp。(strcmp(pname,sn)!=0)){ q=p。p=plink。}if((strcmp(pname,sn)==0)amp。amp。 p!=NULL){flag=1。printf( name price publshier\n)。printf(Book Found: %s % %s\n,pname,pprice,ppub)。printf(Do you want to del this book(y/n))。scanf(\n%c,amp。s)。if(s==39。y39。 || s==39。Y39。){if(p==head)head=plink。else qlink=plink。free(p)。printf(This book is deleted!\n)。printf(\n\t\tPress any keys !)。getch()。}else{printf(\nThis book not delete!\n)。printf(\n\t\tPress any keys!)。getch()。return head。}}else { if(flag!=1){ printf(\nNOT found!)。printf(\n\t\tPress any key!)。getch()。}break。}if(p!=NULL){ p=plink。 }}return h