struct book /*图书信息*/
{
int num; /*书号*/
char name[10]; /*书名*/
char where[10]; /*所在书库*/
char author[15]; /*作者*/
char pub[20]; /*出版社*/
int count; /*数量*/
struct book *next;
};
/*输出模块*/
void print(struct book *p0)
{
struct book *p;
p=p0->next;
printf(" ^^^^^^^^^^^^^^图书信息表^^^^^^^^^^^^^^");
printf(" 图书编号---图书名称---所在书库----作者----出版社---
数量");
while(p!=NULL)
{
printf(PT);
p=p->next;
}
getch();
}
/*输入模块*/
struct book *creat()
{
struct book *head,*p1,*p2;
int i=0;
head=p2=(struct book *)malloc(N);
head->next=NULL;
printf(" 录入图书信息");
printf(" ---------------------------------------");
while(1)
{ p1=(struct book *)malloc(N);
printf(" 请输入图书编号(书号为 0 结束): ");
scanf("%d",&p1->num);