图书管理系统需要c语言吗,图书管理系统c语言绝对可以用(10页)-原创力文档...

#include

#define booksize 100

#define blhnum 50

#define rrunm 50 #include typedef struct{ int bno; char bname[21]; int namenext; char author[9]; int authnext; char press[11]; int prenext; char sortno[4]; int storenum; int borrownum;

}bookrectype;

typedef struct{ bookrectype bookdbase[booksize]; int len;

}bookdbasefile;

typedef struct{

int bno;

int recno;

}bidxrectype;

typedef struct{

bidxrectype bnoidx[booksize]; int len;

}bnoidxfile;

typedef struct{

char bname[21];

int lhead;

int recnum;

}bnrectype;

typedef struct{

bnrectype lhfrec1[blhnum];

}

}

int len1;

}lhfile1;

typedef struct{

char author[9];

int lhead;

int recnum;

}barectype;

typedef struct {

barectype lhfrec2[blhnum]; int len2;

}lhfile2;

typedef struct {

char press[11];

int lhead;

int recnum;

}bprectype;

typedef struct{

bprectype lhfrec3[blhnum]; int len3;

}lhfile3;

typedef struct{

int rno;

char name[8];

int bn1;

int bn2;

}rrectype;

typedef struct{

rrectype readrec[rrunm]; int len;

}readerfile;

typedef struct{

int rno;

int recno;

}ridxrectype;

typedef struct{

ridxrectype rnoidx[rrunm]; int len;

}rnoidxfile;

typedef struct{

int rno;

int bno;

char date1[9];

char date2[9];

}bbookrectype;

typedef struct{

bbookrectype bbook[booksize];

int len;

}bbookfile;

bookdbasefile appedbaserec(bookdbasefile bf)

{ int i;

i=++bf.len;

printf(" 书号 书 名 作者名 出版商 分类号 藏书量 \n"); scanf("%d%s",&bf.bookdbase[i].bno, bf.bookdbase[i].bname); scanf("%s%s",&bf.bookdbase[i].author, bf.bookdbase[i].press); scanf("%s %d",&bf.bookdbase[i].sortno,&bf.bookdbase[i].storenum); bf.bookdbase[i].borrownum=0;

return bf;

}

bnoidxfile changebnoidxf(bookdbasefile bf,bnoidxfile bif)

{ int i,j,k=1;

i=bf.len;

j=bif.len;

while(j>=1)

{

if(bf.bookdbase[i].bno>bif.bnoidx[i].bno)

{ k=j+1;break;}

j--;

}

if(bif.len>0)

for(j=bif.len;j>=k;j--)

bif.bnoidx[j+1]=bif.bnoidx[j]; bif.bnoidx[k].bno=bf.bookdbase[i].bno;

bif.bnoidx[k].recno=i;

bif.len++;

return bif;

lhfile1 changelinkheabf1(bookdbasefile *bf,lhfile1 lhf1)

{ int i,j,k,m;

char sm[21];

i=bf->l

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值