如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
/NUMPAGES27
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
structbook{
intnum;
charbname[50];
charwname[20];
charpress[50];
charsort[50];
inttime;
floatprice;
structbook*next;
};
structbook*creatbook();//创建链表
structbook*addbook(structbook*head);//添加图书
intyanzheng(structbook*head,intm);//验证新添加的图书编码是否已存在
voiddeletebook(structbook*head);//删除图书
voidfprint(structbook*head);//将链表写入文件
structbook*load();//从文件中读取信息并建成链表
voidprint_book(structbook*head);//将链表信息输出
voidchaxun(structbook*head);//查询图书信息
voidnum_chaxun(structbook*head);//按图书编号查询图书
voidwname_chaxun(structbook*head);//按作者名查询图书
voidsort_chaxun(structbook*head);//按类别查询图书
voidtime_chaxun(structbook*head);//按出版时间查询图书
voidbname_chaxun(structbook*head);//按图书名查询图书
voidxiugai(structbook*head);//修改图书信息
voidpaixu(structbook*head);//对图书进行排序
voidnum_paixu(structbook*head);//按图书编号排序
voidtime_paixu(structbook*head);//按图书出版时间排序
voidprice_paixu(structbook*head);//按图书价格排序
voidbname_paixu(structbook*head);//按图书名排序
voidwname_paixu(structbook*head);//按作者名排序
intmain()
{
intchoice,n,x,y=1,c,c1=1234;
chara,d,b[10],b1[10]="yjk";
structbook*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){
case0:
y=0;
break;
case1:
printf("请输入您的用户名:");
gets(b);
printf("\n");
printf("请输入您的密码:");
scanf("%d",&c);
printf("\n");
if(strcmp(b,b1)!=0||c!=c1){
printf("验证失败,请重新输入!\n");
scanf("%c",&d);
getchar();
system("cls");
}
else{
printf("验证通过!请按Enter键进入!\n");
scanf("%c",&d);
getchar();
x=1;
while(x){
system("cls");
printf("------------------\n");
printf("*图书信息管理系统*\n");
printf("------------------\n\n");
printf("**********************************************\n\n");
printf("******************
17****21
实名认证
内容提供者
最近下载