七个文件
1. book.txt存放书籍
2.borrower.txt存放借阅信息
3.chenwen.txt 存放开始信息
4. mima.txt存放密码 5.qianyan.txt前言
6.student.txt存放学生信息
7.yuyue.txt 存放预约信息
#include #include #include void guanliyuan(); void youke(); typedef struct borrower{ struct borrower *next; struct borrower *front; int book; int stu;
int times;
int sum; }Borr; typedef struct stus{ int numbers; char mark[40];
char name[40];
char xueyuan[40];
int sum;
struct stus *next;
struct stus *front; }Stus; typedef struct books{ struct books *front; int numbers; char name[40]; char author[40]; char type[40]; char publisher[40]; int sum; int cun; struct books *next; }Books; void chenwenxie4(); void chenwen(); void time(); void time1(); void fangkuang(); void printstudent1(Stus *head); Borr* buildborrowerlist(); Books* buildbookslist(); Stus* buildstudentlist(); Books* insertbook(Books *head1,Books *pa); Stus* insertstudent(Stus *head2,Stus *pb); Borr* insertborrower(Borr *head3,Borr *pc); Books* chenwensousou11(Books* head11,int num11); Books* chenwensousou12(Books* head12,char name12[]); Books* chenwensousou13(Books* head13,int num13); Books* chenwensousou15(Books* head22,char name22[]); Stus* chenwensousou21(Stus* head21,int num21); Stus* chenwensousou22(Stus* head22,char name22[]); Stus* chenwensousou23(Stus* head23,int num23); Borr* chenwensousou31(Borr* head31,int num31); Borr* chenwensousou32(Borr* head32,int num32); Borr* chenwensousou33(Borr* head33,int num33); Borr* chenwensousou34(Borr* head34,int num34); Books* deletebook1(Books *head,int num); Stus* deletestudent1(Stus *head,int num); Borr* deleteborrower1(Borr *head,int num); Borr* deleteborrower2(Borr *head,int num); Books* booksorting11(Books *head); Books* booksorting12(Books *head); Stus* studentsorting21(Stus *head); Stus* studentsorting22(Stus *head); Borr* borrowersorting31(Borr *head); Borr* borrowersorting32(Borr *head); Borr* borrowersorting33(Borr *head); Books* chenwensousou14(Books* head12,char type[]); void printbook(Books *head); void printborrower(Borr *head); void chenwendu1(Books *head); void chenwendu2(Stus *head); void chenwendu3(Borr *head); Books* chenwenxie1(); Stus* chenwenxie2(); Stus* chenwenxie22(); Borr* chenwenxie3(); Borr* yuyuexie(); void yuyuedu(Borr *head); Books bookcreat(); Stus studentcreat(); Borr borrowercreat(); void time2(); void qingkong(); void qingkong1(); void qingkong2(); void qingkong3(); int yanzheng(Books* head,int num); int yanzheng1(Stus* head,int num); int yanzheng2(Borr* head,int num); int yanzheng3(int num); void bianli(Books *head1,Stus *head2,Borr *head3); void sousuo(Books *head1,Stus *head2,Borr *head3); void paixu(Books *head1,Stus *head2,Borr *head3); void mimadu(char a[]); void sousuo1(Borr *headborrower); char* mimaxie(); void qingkong4(); void tishi1(); void tishi2(); int main() { int n=0,i; char choice=3,ch[40],ch1[3]=\"是\",cw; printf(\"████████████▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉█▉\\n\"); time();
printf(\"█┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓█\\n\"); time();
printf(\"█┃******************欢迎进入河南工业大学图书管理系统********************* ┃▉\\n\"); time();
printf(\"█┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛█\\n\"); time();
printf(\"████████████▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉██\\n\");
for(i=0;i
time(); system(\"cls\"); chenwen(); chenwenxie4(); while(1){
scanf(\"%s\",ch);
if(strcmp(ch,ch1)==0)
break;
else{
system(\"cls\");
printf(\"████████████▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉█▉\\n\");
printf(\"█┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓█\\n\");
printf(\"■┃〓〓〓〓〓〓〓对不起,你尚未同意该协议,不能使用该系统〓〓〓〓〓〓〓〓〓┃█\\n\");
printf(\"█┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛█\\n\");
printf(\"█ ▓▓▓▓▓▓▓▓▓▓我已阅读并同意该协议?(是/否)▓▓▓▓▓▓▓▓▓▓▓▓ ▉\\n\");
printf(\"████████████▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉█▉\\n\");
} } getchar(); system(\"cls\"); while(n==0){ printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\"); printf(\" ┃ ▼▲▼▲▼▲▼▲▼欢迎进入河南工业大学图书管理系统 ▼▲▼▲▼▲▼▲▼
┃\\n\"); printf(\" ┣━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━┫\\n\"); printf(\" ┃
★(0)退出
┃
★(1)管理员登录
┃
★(2)学生登录
┃\\n\"); printf(\" ┣━━━━━━━━━━━┻━━━━━━━━━━━━━┻━━━━━━━━━━┫\\n\"); printf(\" ┃
▂▃▄▅▆▇█▉▊▋▌●●● 请输入选择●●●▌▋▊█▉▇▆▅▄▃▂
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%c\",&choice)&&choice>=\'0\'&&choice
scanf(\"%c\",&cw);
if(cw!=\'\\n\'){
tishi2();
while(cw!=\'\\n\'){
scanf(\"%c\",&cw);
}
continue;
}
switch(choice){
case \'0\':system(\"cls\");
chenwen();
return 0;
case \'1\':guanliyuan();
break;
case \'2\':youke();
break;
}
}
else{
tishi2();
while(choice!=\'\\n\'){
scanf(\"%c\",&choice);
}
} } printf(\"████████████▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉█▉\\n\"); time();
printf(\"█┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓█\\n\"); time();
printf(\"█┃******************谢谢使用河南工业大学图书管理系统********************* ┃▉\\n\"); time();
printf(\"█┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛█\\n\"); time();
printf(\"████████████▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉██\\n\");
for(i=0;i
time(); system(\"cls\"); return 0; } void guanliyuan() {
char choice,choice1,choice2,cw;
int f=1; int n=0,j=3,l=0,a=0,g=0;
char *ppp=(char *)malloc(40*sizeof(char)); Books *headbook=chenwenxie1(),*pa=NULL,*book; Stus *headstudent=chenwenxie2(),*pb=NULL,*stu; Borr *headborrower=chenwenxie3(),*pc=NULL,*headyuyue=yuyuexie(),*yu; char p[40]; p[0]=\'4\',p[1]=\'3\',p[2]=\'1\',p[3]=\'5\',p[4]=\'c\',p[5]=\'w\';
ppp=mimaxie(); system(\"cls\"); printf(\"
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\"); printf(\"
┃◆◆◆◆◆◆◆◆◆◆◆◆欢迎管理员登陆◆◆◆◆◆◆◆◆◆◆◆◆┃\\n\"); printf(\"
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\"); printf(\"
┃▁▂▃▄▅▆▇█▉▊▋▌▌请输入密码▍▌▋▊▉█▇▆▅▄▃▂▁┃\\n\"); printf(\"
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\"); printf(\"
┃ ▓▓▓▓▓▓▓▓▓▓★你一共有3次机会★▓▓▓▓▓▓▓▓▓▓▓┃\\n\"); printf(\"
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
g=0;
while(n==0){
scanf(\"%s\",p+6);
if(strcmp(ppp,p)==0){
getchar();
l=0;
system(\"cls\");
while(1){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃*****************************您享有的操作*******************************┃\\n\");
printf(\" ┃************************************************************************┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃ ★(0)返回上级 ★(1)创建列表 ★(2)插入(借还) ★(3)删除(借还) ★(4)遍历
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★(5)排序
★(6)搜索
★(7)修改密码
★(8)保存
★(9)清空文件
┃\\n\" );
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃▉▉▉▉▉▉▉▉▉▉▉▉▉●●●请输入选择●●●▉▉▉▉▉▉▉▉▉▉▉▉┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%c\",&choice)&&choice>=\'0\'&&choice
scanf(\"%c\",&cw);
if(cw!=\'\\n\'){
tishi2();
while(cw!=\'\\n\'){
scanf(\"%c\",&cw);
}
continue;
}
switch(choice){
case \'0\':
system(\"cls\");
break;
case \'1\':{
system(\"cls\");
while(n==0){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃*****************************您享有的操作*******************************┃\\n\");
printf(\" ┃************************************************************************┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★(0)返回上级
★(1)创建图书链表 ★(2)创建学生链表 ★(3)创建借阅链表
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃▉▉▉▉▉▉▉▉▉▉▉▉▉●●●请输入选择●●●▉▉▉▉▉▉▉▉▉▉▉▉┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%c\",&choice1)&&choice1>=\'0\'&&choice1
scanf(\"%c\",&cw);
if(cw!=\'\\n\'){
tishi2();
while(cw!=\'\\n\'){
scanf(\"%c\",&cw);
}
continue;
}
switch(choice1){
case \'0\':
system(\"cls\");
break;
case \'1\':headbook=buildbookslist();
g=1;
break;
case \'2\':headstudent=buildstudentlist();
g=1;
break;
case \'3\':headborrower=buildborrowerlist();
g=1;
break;
}
}
else{
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓对不起,您的输入有误▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
while(choice1!=\'\\n\'){
scanf(\"%c\",&choice1);
}
}
if(choice1==\'0\'){
break;
}
}
}
break;
case \'2\': {
system(\"cls\");
while(n==0){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃*****************************您享有的操作*******************************┃\\n\");
printf(\" ┃************************************************************************┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★(0)返回上级
★(1)插入图书信息 ★(2)插入学生信息
★(3)插入借阅信息 ┃\\n\");
printf(\" ┃________________________________________________________________________┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃▉▉▉▉▉▉▉▉▉▉▉▉▉●●●请输入选择●●●▉▉▉▉▉▉▉▉▉▉▉▉┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%c\",&choice1)&&choice1>=\'0\'&&choice1
scanf(\"%c\",&cw);
if(cw!=\'\\n\'){
tishi2();
while(cw!=\'\\n\'){
scanf(\"%c\",&cw);
}
continue;
}
switch(choice1){
case \'0\':
system(\"cls\");
break;
case \'1\':{
system(\"cls\");
if(headbook==NULL){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓图书链表为空,请先创建图书链表〓〓〓〓〓〓〓〓〓〓┃\\n\");
}
else{
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃*****************************您享有的操作*******************************┃\\n\");
printf(\" ┃************************************************************************┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃████████████请输入你要插入的图书信息████████████┃|\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★1.编号
★2.书名
★3.作者
★4.类型
★5.出版社
★(6)库存
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃▲▼●◆■★▼▲★■◆请依次输入(用空格隔开)▍▌▋▊▉█▇▆▅▄▃▂▁┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if((pa=(Books *)malloc(sizeof(Books)))==NULL){
printf(\"Not able to allocate memory.\\n\");
exit(1);
}
while(scanf(\"%d\",&pa->numbers)&&scanf(\"%s\",pa->name)&&scanf(\"%s\",pa->author)&&scanf(\"%s\",pa->type)&&scanf(\"%s\",pa->publisher)&&scanf(\"%d\",&pa->cun)){
getchar();
system(\"cls\");
headbook=insertbook(headbook,pa);
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓恭喜你,插入成功▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
l=1;
break;
}
if(l==0){
tishi2();
getchar();
}
}
l=0;
break;
}
case \'2\':{
if(headstudent==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃
██████████学生链表为空,请先创建学生链表██████████ ┃\\n\");
}
else{
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃*****************************您享有的操作*******************************┃\\n\");
printf(\" ┃************************************************************************┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃████████████请输入你要插入的学生信息████████████┃|\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★1.学号★
★2.姓名★
★3.学院★
★4.身份证★
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃▲▼●◆■★▼▲★■◆请依次输入(用空格隔开)▍▌▋▊▉█▇▆▅▄▃▂▁┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if((pb=(Stus *)malloc(sizeof(Stus)))==NULL){
printf(\"Not able to allocate memory.\\n\");
exit(1);
}
while(scanf(\"%d\",&pb->numbers)&&scanf(\"%s\",pb->name)&&scanf(\"%s\",pb->xueyuan)&&scanf(\"%s\",pb->mark)){
getchar();
stu=chenwensousou21(chenwenxie2(),pb->numbers);
if(stu!=NULL){
free(pb);
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓对不起,该学号已存在▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
l=1;
system(\"pause\");
system(\"cls\");
break;
}
headstudent=insertstudent(headstudent,pb);
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓恭喜你,插入成功▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
l=1;
break;
}
if(l==0){
tishi2();
getchar();
}
}
l=0;
break;
}
case \'3\':{
if(headborrower==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃
██████████借阅链表为空,请先创建借阅链表██████████ ┃n\");
}
else{
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃*****************************您享有的操作*******************************┃\\n\");
printf(\" ┃************************************************************************┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃████████████请输入你要插入的借阅信息████████████┃|\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★★1.学号★★
★★2.书编★★
★★3.时间★★
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃***********请注意:(时间格式 年月日 比如1992年08月13日为920813)**********┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃▲▼●◆■★▼▲★■◆请依次输入(用空格隔开)▍▌▋▊▉█▇▆▅▄▃▂▁┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if((pc=(Borr *)malloc(sizeof(Borr)))==NULL){
printf(\"Not able to allocate memory.\\n\");
exit(1);
}
while(scanf(\"%d\",&pc->stu)&&scanf(\"%d\",&pc->book)&&scanf(\"%d\",&pc->times)){
if(yanzheng2(chenwenxie3(),pc->book)==0){
free(pc);
break;
}
stu=chenwensousou21(chenwenxie2(),pc->stu);
if(stu==NULL){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓对不起,该学号不存在▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
free(pc);
system(\"pause\");
system(\"cls\");
break;
}
if(chenwensousou11(chenwenxie1(),pc->book)==NULL){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓对不起,该书编不存在▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
free(pc);
system(\"pause\");
system(\"cls\");
break;
}
book=chenwensousou11(chenwenxie1(),pc->book);
book->cun--;
getchar();
if(headyuyue!=NULL)
yu=chenwensousou32(headyuyue,pc->book);
if(yu!=NULL&&headyuyue!=NULL){
headyuyue=deleteborrower1(yuyuexie(),pc->book);
if(headyuyue!=NULL)
yuyuedu(headyuyue);
else{
qingkong4();
}
}
headborrower=insertborrower(headborrower,pc);
if(headbook!=NULL)
chenwendu1(headbook);
if(headborrower!=NULL)
chenwendu3(headborrower);
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓恭喜你,插入成功▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
l=1;
break;
}
if(l==0){
tishi2();
getchar();
}
}
l=0;
break;
}
}
}
else{
tishi2();
while(choice1!=\'\\n\'){
scanf(\"%c\",&choice1);
}
}
if(choice1==\'0\'){
break;
}
}
}
break;
case \'3\':
system(\"cls\");
{
while(n==0)
{
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃*****************************您享有的操作*******************************┃\\n\");
printf(\" ┃************************************************************************┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃████████████请输入你要删除的借阅信息████████████┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃ ★(0)返回上级
★(1)删除图书信息
★(2)删除学生信息
★(3)删除借阅信息 ┃\\n \");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃▉▉▉▉▉▉▉▉▉▉▉▉▉●●●请输入选择●●●▉▉▉▉▉▉▉▉▉▉▉▉┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%c\",&choice2)&&choice2>=\'0\'&&choice2
{
scanf(\"%c\",&cw);
if(cw!=\'\\n\'){
tishi2();
while(cw!=\'\\n\'){
scanf(\"%c\",&cw);
}
continue;
}
switch(choice2)
{
case \'0\':
system(\"cls\");
break;
case \'1\':
{
if(headbook==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓图书链表为空,请先创建图书链表〓〓〓〓〓〓〓〓〓〓┃\\n\");
}
else
{
system(\"cls\");
while(n==0)
{
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃*****************************您享有的操作*******************************┃\\n\");
printf(\" ┃************************************************************************┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃━━━━━━━━━━━请输入你要删除的图书信息的━━━━━━━━━━━━┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★0.返回上级
★1.编号
★2.书名
★3.位置
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃▉▉▉▉▉▉▉▉▉▉▉▉▉●●●请输入选择●●●▉▉▉▉▉▉▉▉▉▉▉▉┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if((pa=(Books *)malloc(sizeof(Books)))==NULL)
{
printf(\"Not able to allocate memory.\\n\");
exit(1);
}
if(scanf(\"%c\",&choice1)&&choice1>=\'0\'&&choice1
{
scanf(\"%c\",&cw);
if(cw!=\'\\n\'){
tishi2();
while(cw!=\'\\n\'){
scanf(\"%c\",&cw);
}
continue;
}
switch(choice1)
{
case \'0\':
system(\"cls\");
break;
case \'1\':
if(headbook==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓〓〓链表为空,请先创建链表〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
break;
}
system(\"cls\");
tishi1();
printf(\" ┃
输入编号●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%d\",&pa->numbers))
{
getchar();
pa=chenwensousou11(headbook,pa->numbers);
}
else
{
getchar();
pa=NULL;
}
break;
case \'2\':
if(headbook==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓〓〓链表为空,请先创建链表〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
break;
}
system(\"cls\");
tishi1();
printf(\" ┃
输入书名●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%s\",pa->name))
{
getchar();
pa=chenwensousou15(headbook,pa->name);
}
else
{
getchar();
pa=NULL;
}
break;
case \'3\':
if(headbook==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓〓〓链表为空,请先创建链表〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
break;
}
system(\"cls\");
tishi1();
printf(\" ┃
输入位置●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%d\",&pa->sum))
{
getchar();
pa=chenwensousou13(headbook,pa->sum);
}
else
{
getchar();
pa=NULL;
}
break;
}
if(choice1==\'0\')
{
break;
}
if(pa==NULL)
{
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓〓〓没有找到你想删除的信息〓〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
}
else
{
if(headbook==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓〓〓链表为空,请先创建链表〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
break;
}
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃◆◆◆◆◆◆◆◆◆◆◆◆你要删除的信息是这些嘛?◆◆◆◆◆◆◆◆◆◆◆◆┃\\n\");
printf(\" ┣━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┫\\n\");
printf(\" ┃
①编号┃
②书名┃
③作者 ┃\\n\");
printf(\" ┣━━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┫\\n\");
printf(\" ┃ %21d ┃ %21s┃ %20s ┃\\n\",pa->numbers,pa->name,pa->author);
printf(\" ┣━━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━┳━━━━━┫\\n\");
printf(\" ┃
④类型┃
⑤出版社┃
⑥位置┃
⑦库存量┃\\n\");
printf(\" ┣━━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━╋━━━━━┫\\n\");
printf(\" ┃ %23s┃ %21s┃%10d┃%10d┃\\n\",pa->type,pa->publisher,pa->sum,pa->cun);
printf(\" ┣━━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━┻━━━━━┫\\n\");
printf(\" ┃
★(0)不删除,返回上级
★(1)删除
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%c\",&choice2)&&choice2==\'0\'){
system(\"cls\");
break;
}
if(choice2!=\'1\'){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓〓你的输入有误,此信息未删除〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
system(\"pause\");
system(\"cls\");
break;
}
headbook=deletebook1(headbook,pa->numbers);
if(headbook!=NULL)
chenwendu1(headbook);
if(headborrower!=NULL)
headborrower=deleteborrower1(headborrower,pa->numbers);
if(headborrower!=NULL)
chenwendu3(headborrower);
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓恭喜你,删除成功〓〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
}
}
else
{
tishi2();
while(choice1!=\'\\n\')
scanf(\"%c\",&choice1);
}
}
}
break;
}
case \'2\':
{
if(headstudent==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓〓〓链表为空,请先创建链表〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
}
else
{
system(\"cls\");
while(n==0)
{
tishi1();
printf(\" ┃━━━━━━━━━━━━请输入你要删的学生信息的━━━━━━━━━━━┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★0.返回上级
★1.学号
★2.名字
★3.位置
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
请输入选择●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if((pb=(Stus *)malloc(sizeof(Stus)))==NULL)
{
printf(\"Not able to allocate memory.\\n\");
exit(1);
}
if(scanf(\"%c\",&choice1)&&choice1>=\'0\'&&choice1
{
scanf(\"%c\",&cw);
if(cw!=\'\\n\'){
tishi2();
while(cw!=\'\\n\'){
scanf(\"%c\",&cw);
}
continue;
}
switch(choice1)
{
case \'0\':
system(\"cls\");
break;
case \'1\':
if(headstudent==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓〓〓链表为空,请先创建链表〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
break;
}
system(\"cls\");
tishi1();
printf(\" ┃
输入学号●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%d\",&pb->numbers))
{
getchar();
pb=chenwensousou21(headstudent,pb->numbers);
}
else
{
getchar();
pb=NULL;
}
break;
case \'2\':
if(headstudent==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓〓〓链表为空,请先创建链表〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
break;
}
system(\"cls\");
tishi1();
printf(\" ┃
输入名字●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%s\",pb->name))
{
getchar();
pb=chenwensousou22(headstudent,pb->name);
}
else
{
getchar();
pb=NULL;
}
break;
case \'3\':
if(headstudent==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓〓〓链表为空,请先创建链表〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
break;
}
system(\"cls\");
tishi1();
printf(\" ┃
输入位置●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%d\",&pb->sum))
{
getchar();
pb=chenwensousou23(headstudent,pb->sum);
}
else
{
getchar();
pb=NULL;
}
break;
}
if(choice1==\'0\')
{
break;
}
if(pb==NULL)
{
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓对不起,没有找到你想删除的信息▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
}
else
{
if(headstudent==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓〓〓链表为空,请先创建链表〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
break;
}
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃◆◆◆◆◆◆◆◆◆◆◆◆你要删除的信息是这些嘛?◆◆◆◆◆◆◆◆◆◆◆◆┃\\n\");
printf(\" ┣━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┳━━━━━┫\\n\");
printf(\" ┃
学号
┃
姓名
┃
学院
┃
位置 ┃\\n\");
printf(\" ┣━━━━━━━━━╋━━━━━━━━━╋━━━━━━━━━━╋━━━━━┫\\n\");
printf(\" ┃%18d┃ %17s┃ %19s┃ %8d ┃\\n\",pb->numbers,pb->name,pb->xueyuan,pb->sum);
printf(\" ┣━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━━┻━━━━━┫\\n\");
printf(\" ┃
★(0)不删除,返回上级
★(1)删除
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%c\",&choice2)&&choice2==\'0\'){
system(\"cls\");
break;
}
if(choice2!=\'1\'){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\"
┃▓▓▓▓▓▓▓▓▓▓▓你的输入有误,此信息未删除▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
system(\"pause\");
system(\"cls\");
break;
}
headstudent=deletestudent1(headstudent,pb->numbers);
if(headstudent!=NULL)
chenwendu2(headstudent);
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓〓〓〓〓恭喜你,删除成功〓〓〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
}
}
else
{
tishi2();
while(choice1!=\'\\n\')
scanf(\"%c\",&choice1);
}
}
}
break;
}
case \'3\':
{
if(headborrower==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓〓〓链表为空,请先创建链表〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
}
else
{
system(\"cls\");
while(n==0)
{
tishi1();
printf(\" ┃━━━━━━━━━━━━请输入你要删的借阅信息的━━━━━━━━━━━┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★0.返回上级
★1.学号
★2.书编
★3.位置
★4.时间
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃*******请注意:(时间格式 年月日 比如1992年08月13日 为 920813)*********┃ \\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
请输入选择●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if((pc=(Borr *)malloc(sizeof(Borr)))==NULL)
{
printf(\"Not able to allocate memory.\\n\");
exit(1);
}
if(scanf(\"%c\",&choice1)&&choice1>=\'0\'&&choice1
{
scanf(\"%c\",&cw);
if(cw!=\'\\n\'){
tishi2();
while(cw!=\'\\n\'){
scanf(\"%c\",&cw);
}
continue;
}
switch(choice1)
{
case \'0\':
system(\"cls\");
break;
case \'1\':
if(headborrower==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓〓〓链表为空,请先创建链表〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
break;
}
system(\"cls\");
tishi1();
printf(\" ┃
输入学号●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%d\",&pc->stu))
{
getchar();
pc=chenwensousou31(headborrower,pc->stu);
}
else
{
getchar();
pc=NULL;
}
break;
case \'2\':
if(headborrower==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓〓〓链表为空,请先创建链表〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
break;
}
system(\"cls\");
tishi1();
printf(\" ┃
输入编号●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%d\",&pc->book))
{
getchar();
pc=chenwensousou32(headborrower,pc->book);
}
else
{
getchar();
pc=NULL;
}
break;
case \'3\':
if(headborrower==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓〓〓链表为空,请先创建链表〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
break;
}
system(\"cls\");
tishi1();
printf(\" ┃
输入位置●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%d\",&pc->sum))
{
getchar();
pc=chenwensousou33(headborrower,pc->sum);
}
else
{
getchar();
pc=NULL;
}
break;
case \'4\':
if(headborrower==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓〓〓链表为空,请先创建链表〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
break;
}
system(\"cls\");
tishi1();
printf(\" ┃
输入时间●●●●●●
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃********请注意:(时间格式 年月日 比如1992年08月13日 为 920813)********┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%d\",&pc->times))
{
getchar();
pc=chenwensousou34(headborrower,pc->times);
}
else
{
getchar();
pc=NULL;
}
break;
}
if(choice1==\'0\')
{
break;
}
if(pc==NULL)
{
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓对不起,没有找到你想删除的信息▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
}
else
{
if(headborrower==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ 〓〓〓〓〓〓〓〓〓〓〓〓〓链表为空,请先创建链表〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
break;
}
if(choice1==\'2\'||choice1==\'3\'){
system(\"cls\");
pb=chenwensousou21(headstudent,pc->stu);
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃◆◆◆◆◆◆◆◆◆◆◆◆你要删除的信息是这些嘛?◆◆◆◆◆◆◆◆◆◆◆◆┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
姓名:\");
printf(\"
%20s
┃\\n\",pb->name);
printf(\" ┣━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━┫\\n\");
printf(\" ┃
学号
┃
书编
┃
时间
┃
位置
┃\\n\");
printf(\" ┣━━━━━━━━━╋━━━━━━━━━╋━━━━━━━━╋━━━━━━━┫\\n\");
printf(\" ┃ %16d ┃ %16d ┃ %14d ┃%13d ┃\\n\",pc->stu,pc->book,pc->times,pc->sum);
printf(\" ┣━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━┻━━━━━━━┫\\n\");
pa=chenwensousou11(headbook,pc->book);
printf(\" ┃
%20s
┃\\n\",pa->name);
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★(0)不删除,返回上级
★(1)删除
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%c\",&choice2)&&choice2==\'0\'){
getchar();
system(\"cls\");
break;
}
if(choice2!=\'1\'){
getchar();
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓〓〓你的输入有误,此信息未删除〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
system(\"pause\");
system(\"cls\");
break;
}
getchar();
book=chenwensousou11(chenwenxie1(),pc->book);
book->cun++;
headborrower=deleteborrower2(headborrower,pc->stu);
if(headborrower!=NULL)
chenwendu3(headborrower);
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓〓〓〓〓恭喜你,删除成功〓〓〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
}
else{
pc=pc->next;
while(pc!=NULL){
headbook=chenwenxie1();
book=chenwensousou11(headbook,pc->book);
book->cun++;
system(\"cls\");
pb=chenwensousou21(headstudent,pc->stu);
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃◆◆◆◆◆◆◆◆◆◆◆◆你要删除的信息是这些嘛?◆◆◆◆◆◆◆◆◆◆◆◆┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
姓名:\");
printf(\"
%20s
┃\\n\",pb->name);
printf(\" ┣━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━┫\\n\");
printf(\" ┃
学号
┃
书编
┃
时间
┃
位置
┃\\n\");
printf(\" ┣━━━━━━━━━╋━━━━━━━━━╋━━━━━━━━╋━━━━━━━┫\\n\");
printf(\" ┃ %16d ┃ %16d ┃ %14d ┃%13d ┃\\n\",pc->stu,pc->book,pc->times,pc->sum);
printf(\" ┣━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━┻━━━━━━━┫\\n\");
pa=chenwensousou11(headbook,pc->book);
printf(\" ┃
%20s
┃\\n\",pa->name);
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★(0)不删除,返回上级
★(1)删除
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%c\",&choice2)&&choice2==\'0\'){
getchar();
system(\"cls\");
pc=pc->next;
continue;
}
if(choice2!=\'1\'){
getchar();
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓〓〓你的输入有误,此信息未删除〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
pc=pc->next;
system(\"pause\");
system(\"cls\");
continue;
}
getchar();
headborrower=deleteborrower2(headborrower,pc->stu);
if(headborrower!=NULL)
chenwendu3(headborrower);
if(headbook!=NULL)
chenwendu1(headbook);
pc=pc->next;
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓〓〓〓〓恭喜你,删除成功〓〓〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
}
}
}
}
else
{
tishi2();
while(choice1!=\'\\n\')
scanf(\"%c\",&choice1);
}
}
}
break;
}
}
if(choice2==\'0\')
{
break;
}
}
else
{
tishi2();
while(choice2!=\'\\n\')
scanf(\"%c\",&choice2);
}
}
break;
}
case \'4\':
bianli(headbook,headstudent,headborrower);
break;
case \'5\':
paixu(headbook,headstudent,headborrower);
break;
case \'6\':
sousuo(headbook,headstudent,headborrower);
break;
case \'7\':
system(\"cls\");
while(1){
tishi1();
printf(\" ┃
请输入新密码●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
scanf(\"%s\",ppp);
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃
请再次输入密码●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
scanf(\"%s\",p);
if(strcmp(ppp,p)==0){
mimadu(p);
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓密码修改成功〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
getchar();
break;
}
else{
system(\"cls\");
tishi1();
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓两次密码不同,修改失败▓▓▓▓▓▓▓▓▓▓▓▓ ┃\\n\");
getchar();
while(1){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃
★(0)返回上级
★(1)继续修改
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
请输入选择●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
if(scanf(\"%c\",&choice2)&&choice2>=\'0\'&&choice2
scanf(\"%c\",&cw);
if(cw!=\'\\n\'){
tishi2();
while(cw!=\'\\n\'){
scanf(\"%c\",&cw);
}
continue;
}
switch(choice2){
case \'0\':
system(\"cls\");
break;
case \'1\':
system(\"cls\");
break;
}
}
else{
tishi2();
while(choice2!=\'\\n\'){
scanf(\"%c\",&choice2);
}
}
if(choice2==\'0\'||choice2==\'1\'){
break;
}
}
if(choice2==\'0\'){
break;
}
}
}
break;
case \'8\':
system(\"cls\");
while(1)
{
tishi1();
printf(\" ┃
★(0).返回上级
★(1).保存图书信息
★(2).保存学生信息
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★(3).保存借阅信息
★(4).保存所有信息
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
请输入选择●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
if(scanf(\"%c\",&choice1)&&choice1>=\'0\'&&choice1
scanf(\"%c\",&cw);
if(cw!=\'\\n\'){
tishi2();
while(cw!=\'\\n\'){
scanf(\"%c\",&cw);
}
continue;
}
switch(choice1){
case \'0\':
system(\"cls\");
break;
case \'1\':
system(\"cls\");
if(headbook==NULL){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓图书链表为空,请先创建图书链表〓〓〓〓〓〓〓〓〓〓〓 ┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
break;
}
chenwendu1(headbook);
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓保存图书链表完成▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
system(\"pause\");
system(\"cls\");
break;
case \'2\':
system(\"cls\");
if(headstudent==NULL){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓学生链表为空,请先创建学生链表〓〓〓〓〓〓〓〓〓〓〓 ┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
break;
}
chenwendu2(headstudent);
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓保存学生链表完成▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
system(\"pause\");
system(\"cls\");
break;
case \'3\':
system(\"cls\");
if(headborrower==NULL){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓借阅链表为空,请先创建借阅链表〓〓〓〓〓〓〓〓〓〓〓 ┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
break;
}
chenwendu3(headborrower);
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓保存借阅链表完成▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
system(\"pause\");
system(\"cls\");
break;
case \'4\':
system(\"cls\");
if(headbook==NULL){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓图书链表为空,请先创建图书链表〓〓〓〓〓〓〓〓〓〓〓 ┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
}
else{
chenwendu1(headbook);
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓保存图书链表完成▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
}
if(headstudent==NULL){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓学生链表为空,请先创建学生链表〓〓〓〓〓〓〓〓〓〓〓 ┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
}
else{
chenwendu2(headstudent);
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓保存学生链表完成▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
}
if(headborrower==NULL){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓借阅链表为空,请先创建借阅链表〓〓〓〓〓〓〓〓〓〓〓 ┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
}
else{
chenwendu3(headborrower);
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓保存借阅链表完成▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
}
system(\"pause\");
system(\"cls\");
break;
}
}
else{
tishi2();
while(choice1!=\'\\n\'){
scanf(\"%c\",&choice1);
}
}
if(choice1==\'0\')
break;
}
break;
case \'9\':
system(\"cls\");
qingkong();
break;
}
}
else{
tishi2();
while(choice!=\'\\n\'){
scanf(\"%c\",&choice);
}
}
if(choice==\'0\'){
break;
}
}
}
else{
tishi2();
j--;
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃ ▓▓▓▓▓▓▓▓▓▓▓▓★你还有%3d次机会★▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃\",j);
printf(\"
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
请输入密码●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
while(choice!=\'\\n\'){
scanf(\"%c\",&choice);
}
if(j==0){
system(\"cls\");
getchar();
return;
}
}
if(choice==\'0\'){
break;
}
} } void youke() { int n=0,l=0,xue=1; char choice,ppp[40],ch,pp[40],p[40],choice2,cw; Books *headbook=chenwenxie1(),*pa=NULL; Stus *headstudent=chenwenxie2(),*pb=NULL,*p1; Borr *headborrower=chenwenxie3(),*pc=NULL,*yu; Borr *headyuyue=yuyuexie(); system(\"cls\"); if(chenwenxie2()==NULL){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓对不起,学生现在不能登录▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
return; } while(xue!=0){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃
★★(0).返回上级★★
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
请输入学号●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if(scanf(\"%d\",&xue)){
getchar();
if(xue==0){
system(\"cls\");
return;
}
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃
★ ★ ★请输入登录密码(初始密码为身份证号码)
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
scanf(\"%s\",ppp);
getchar();
p1=chenwensousou21(chenwenxie2(),xue);
if(p1==NULL){
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓对不起,该学号不存在▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
continue;
}
if(p1->numbers==xue&&strcmp(ppp,p1->mark)==0){
break;
}
else{
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓★★密码错误★★▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
continue;
}
}
else{
system(\"cls\");
system(\"cls\");
scanf(\"%c\",&ch);
while(ch!=\'\\n\'){
scanf(\"%c\",&ch);
}
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓★★对不起,学号不能为字符,请输入数字★★▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
} } system(\"cls\");
while(n==0){
tishi1();
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃████████████████欢迎学生进入██████████████┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★(0)返回上级
★(1)遍历
★(2) 搜索
★(3)排序
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★(4)借书预约
★(5)修改密码
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
请输入选择●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
l++;
if(scanf(\"%c\",&choice)&&choice>=\'0\'&&choice
scanf(\"%c\",&cw);
if(cw!=\'\\n\'){
tishi2();
while(cw!=\'\\n\'){
scanf(\"%c\",&cw);
}
continue;
}
switch(choice)
{
case \'0\':
system(\"cls\");
break;
case \'1\':
bianli(headbook,chenwenxie22(),headborrower);
break;
case \'2\':
sousuo(headbook,headstudent,headborrower);
break;
case \'3\':
paixu(headbook,headstudent,headborrower);
break;
case \'4\':
if(headyuyue==NULL){
yu=(Borr *)malloc(sizeof(Borr));
headyuyue=yu,yu->sum=0,yu->front=NULL,yu->next=NULL;
}
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃*****************************您享有的操作*******************************┃\\n\");
printf(\" ┃************************************************************************┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃█████████████请输入你要预约的信息█████████████┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★★1.书编★★
★★2.时间★★
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃***********请注意:(时间格式 年月日 比如1992年08月13日为920813)**********┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃▲▼●◆■★▼▲★■◆请依次输入(用空格隔开)▍▌▋▊▉█▇▆▅▄▃▂▁┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
if((yu=(Borr *)malloc(sizeof(Borr)))==NULL){
printf(\"Not able to allocate memory.\\n\");
exit(1);
}
yu=(Borr *)malloc(sizeof(Borr));
yu->stu=xue,yu->sum=headyuyue->sum+1;
while(scanf(\"%d\",&yu->book)&&scanf(\"%d\",&yu->times)){
if(chenwensousou11(chenwenxie1(),yu->book)==NULL){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓对不起,该书编不存在▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
free(pc);
system(\"pause\");
system(\"cls\");
break;
}
getchar();
headyuyue=insertborrower(headyuyue,yu);
yuyuedu(headyuyue);
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓恭喜你,预约成功▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃\\n\");
l=1;
break;
}
if(l==0){
tishi2();
getchar();
}
l=0;
break;
case \'5\':
system(\"cls\");
while(1){
tishi1();
printf(\" ┃
请输入新密码●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
scanf(\"%s\",pp);
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃
请再次输入密码●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
scanf(\"%s\",p);
if(strcmp(pp,p)==0){
pb=chenwensousou21(headstudent,xue);
strcpy(pb->mark,p);
chenwendu2(headstudent);
system(\"cls\");
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓密码修改成功〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓┃\\n\");
getchar();
break;
}
else{
system(\"cls\");
tishi1();
printf(\" ┃▓▓▓▓▓▓▓▓▓▓▓▓▓两次密码不同,修改失败▓▓▓▓▓▓▓▓▓▓▓▓ ┃\\n\");
getchar();
while(1){
printf(\" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\");
printf(\" ┃
★(0)返回上级
★(1)继续修改
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
请输入选择●●●●●●
┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\\n\");
if(scanf(\"%c\",&choice2)&&choice2>=\'0\'&&choice2
}
break;
}
}
else{
scanf(\"%c\",&cw);
if(cw!=\'\\n\'){
tishi2();
while(cw!=\'\\n\'){
scanf(\"%c\",&cw);
}
continue;
}
switch(choice2){
case \'0\':
system(\"cls\");
break;
case \'1\':
system(\"cls\");
break;
}
}
else{
tishi2();
while(choice2!=\'\\n\'){
scanf(\"%c\",&choice2);
}
}
if(choice2==\'0\'||choice2==\'1\'){
break;
} } if(choice2==\'0\'){
break; } }
tishi2();
while(choice!=\'\\n\'){
scanf(\"%c\",&choice);
}
}
if(choice==\'0\'){
break;
} } } Books* buildbookslist() { Books *head=NULL,*p,*tail,*begin; int n=sizeof(Books),num; if((begin=(Books *)malloc(n))==NULL){
printf(\"Not able to allocate memory.\\n\");
exit(1); } head=begin,begin->front=NULL,begin->sum=0; if((p=(Books *)malloc(n))==NULL){
printf(\"Not able to allocate memory.\\n\");
exit(1); } begin->next=p,p->front=begin, p->next=NULL; head=begin; p->sum=1; while(1){
system(\"cls\");
tishi1();
printf(\" ┃
★0.返回上级
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★1.编号
★2.书名
★3.作者
★4.类型
★5.出版社
★(6)库存
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃▲▼●◆■★▼▲★■◆请依次输入(用空格隔开)▍▌▋▊▉█▇▆▅▄▃▂▁┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
while(scanf(\"%d\",&num)==0){
getchar();
system(\"cls\");
tishi2();
tishi1();
printf(\" ┃
★0.返回上级
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★1.编号
★2.书名
★3.作者
★4.类型
★5.出版社
★(6)库存
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃▲▼●◆■★▼▲★■◆请依次输入(用空格隔开)▍▌▋▊▉█▇▆▅▄▃▂▁┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
}
if(num==0){
p->front->next=NULL,tail=p->front;
system(\"cls\");
getchar();
free(p);
return head;
}
if(yanzheng(head,num)){
if(scanf(\"%s%s%s%s%d\",p->name,p->author,p->type,p->publisher,&p->cun)){
p->numbers=num;
begin->sum++;
getchar();
tail=p;
if((p=(Books *)malloc(n))==NULL){
printf(\"Not able to allocate memory.\\n\");
exit(0);
}
tail->next=p,p->front=tail,p->next=NULL,p->sum=p->front->sum+1;
}
else{
tishi2();
getchar();
}
} } getchar(); return head; } Stus* buildstudentlist() { Stus *head,*tail,*p,*begin; int num; int n=sizeof(Stus); if((begin=(Stus *)malloc(n))==NULL){
printf(\"Not able to allocate memory.\\n\");
exit(1); } head=begin;
if((p=(Stus *)malloc(n))==NULL){
printf(\"Not able to allocate memory.\\n\");
exit(1); } begin->sum=0,begin->front=NULL; begin->next=p,tail=p,p->next=NULL,p->front=begin; head=begin;
p->sum=1; while(1){
system(\"cls\");
tishi1();
printf(\" ┃
★0.返回上级★
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★1.学号★
★2.姓名★
★3.学院★
★4.身份证 ★
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃▲▼●◆■★▼▲★■◆请依次输入(用空格隔开)▍▌▋▊▉█▇▆▅▄▃▂▁┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
while(scanf(\"%d\",&num)==0){
getchar();
system(\"cls\");
tishi2();
tishi1();
printf(\" ┃
★0.返回上级★
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃
★★1.学号★★
★★2.姓名★★
★★3.学院★★
┃\\n\");
printf(\" ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\\n\");
printf(\" ┃▲▼●◆■★▼▲★■◆请依次输入(用空格隔开)▍▌▋▊▉█▇▆▅▄▃▂▁┃\\n\");
printf(\" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\");
}
if(num==0){
p->front->next=NULL,tail=p->front;
free(p);
getchar();
system(\"cls\");
return head;
}
if(yanzheng1(head,num)){
if(scanf(\"%s%s%s\",p->name,p->xueyuan,p->mark)){
p->numbers=num;
begin->sum++;
getchar();
tail=p;
if((p=(Stus *)malloc(n))==NULL){
printf(\"Not able to allocate memory.\\n\");
exit(1);
}
tail->next=p,p->front=tail,tail=p,p->next=NULL,p->sum=p->front->sum+1;
}
else{
tishi2();
getchar();
}
} } getchar(); return head; } Borr* buildborrowerlist() { Borr *head,*tail,*p,*begin; Stus *stu; Books *book; int n=sizeof(Borr),num; if((begin=(Borr *)malloc(n))==NULL) {
printf(\"Not able to allocate memory.\\n\");
exit(1);