添加图书的代码C语言,C语言图书系统代码.doc

#include

#include

#include

struct book{

int num;

char bname[50];

char wname[20];

char press[50];

char sort[50];

int time;

float price;

struct book *next;

};

struct book *creatbook(); //创建链表

struct book *addbook(struct book *head); //添加图书

int yanzheng(struct book *head,int m); //验证新添加的图书编码是否已存在

void deletebook(struct book *head); //删除图书

void fprint(struct book *head); //将链表写入文件

struct book *load(); //从文件中读取信息并建成链表

void print_book(struct book *head); //将链表信息输出

void chaxun(struct book *head); //查询图书信息

void num_chaxun(struct book *head); //按图书编号查询图书

void wname_chaxun(struct book *head); //按作者名查询图书

void sort_chaxun(struct book *head); //按类别查询图书

void time_chaxun(struct book *head); //按出版时间查询图书

void bname_chaxun(struct book *head); //按图书名查询图书

void xiugai(struct book *head); //修改图书信息

void paixu(struct book *head); //对图书进行排序

void num_paixu(struct book *head); //按图书编号排序

void time_paixu(struct book *head); //按图书出版时间排序

void price_paixu(struct book *head); //按图书价格排序

void bname_paixu(struct book *head); //按图书名排序

void wname_paixu(struct book *head); //按作者名排序

int main()

{

int choice,n,x,y=1,c,c1=1234;

char a,d,b[10],b1[10]="yjk";

struct book *head=NULL;

while(y){

system("cls");

printf("\n\n\n\n\n\n\n");

printf(" ********** 欢迎光临 **********\n\n");

printf(" ********************** 图书信息管理系统 ************************\n\n\n");

printf("\n\n");

printf(" ============1-用户登录===========\n");

printf(" ============0-退出系统===========\n");

printf(" 请输入您的选择:");

scanf("%d",&n);

printf("\n");

getchar();

switch(n){

case 0:

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值