图书管理系统

第一篇:图书管理系统
七个文件
1.book.txt存放书籍
2.borrower.txt存放借阅信息
3.chenwen.txt 存放开始信息
4.mima.txt存放密码 5.qianyan.txt前言
6.student.txt存放学生信息
7.yuyue.txt 存放预约信息
#include
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<25;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<='2'){
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<25;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<='9'){
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<='3'){
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<='3'){
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<='3')
{
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<='3')
{
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<='3')
{
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<='4')
{
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(“ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛nn”);
scanf(“%s”,ppp);
printf(“ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓n”);
printf(“ ┃
请再次输入密码●●●●●●
┃n”);
printf(“ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛nn”);
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(“ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛nn”);
if(scanf(“%c”,&choice2)&&choice2>='0'&&choice2<='1'){
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(“ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛nn”);
if(scanf(“%c”,&choice1)&&choice1>='0'&&choice1<='4'){
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(“ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛nn”);
break;
}
chenwendu1(headbook);
printf(“ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓n”);
printf(“ ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓保存图书链表完成▓▓▓▓▓▓▓▓▓▓▓▓▓┃n”);
printf(“ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛nn”);
system(“pause”);
system(“cls”);
break;
case '2':
system(“cls”);
if(headstudent==NULL){
printf(“ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓n”);
printf(“ ┃〓〓〓〓〓〓〓〓〓〓学生链表为空,请先创建学生链表〓〓〓〓〓〓〓〓〓〓〓 ┃n”);
printf(“ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛nn”);
break;
}
chenwendu2(headstudent);
printf(“ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓n”);
printf(“ ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓保存学生链表完成▓▓▓▓▓▓▓▓▓▓▓▓▓┃n”);
printf(“ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛nn”);
system(“pause”);
system(“cls”);
break;
case '3':
system(“cls”);
if(headborrower==NULL){
printf(“ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓n”);
printf(“ ┃〓〓〓〓〓〓〓〓〓〓借阅链表为空,请先创建借阅链表〓〓〓〓〓〓〓〓〓〓〓 ┃n”);
printf(“ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛nn”);
break;
}
chenwendu3(headborrower);
printf(“ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓n”);
printf(“ ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓保
图书管理系统
本文2025-02-07 07:31:54发表“合同范文”栏目。
本文链接:https://www.wnwk.com/article/1173519.html
- 二年级数学下册其中检测卷二年级数学下册其中检测卷附答案#期中测试卷.pdf
- 二年级数学下册期末质检卷(苏教版)二年级数学下册期末质检卷(苏教版)#期末复习 #期末测试卷 #二年级数学 #二年级数学下册#关注我持续更新小学知识.pdf
- 二年级数学下册期末混合运算专项练习二年级数学下册期末混合运算专项练习#二年级#二年级数学下册#关注我持续更新小学知识 #知识分享 #家长收藏孩子受益.pdf
- 二年级数学下册年月日三类周期问题解题方法二年级数学下册年月日三类周期问题解题方法#二年级#二年级数学下册#知识分享 #关注我持续更新小学知识 #家长收藏孩子受益.pdf
- 二年级数学下册解决问题专项训练二年级数学下册解决问题专项训练#专项训练#解决问题#二年级#二年级数学下册#知识分享.pdf
- 二年级数学下册还原问题二年级数学下册还原问题#二年级#二年级数学#关注我持续更新小学知识 #知识分享 #家长收藏孩子受益.pdf
- 二年级数学下册第六单元考试卷家长打印出来给孩子测试测试争取拿到高分!#小学二年级试卷分享 #二年级第六单考试数学 #第六单考试#二年级数学下册.pdf
- 二年级数学下册必背顺口溜口诀汇总二年级数学下册必背顺口溜口诀汇总#二年级#二年级数学下册 #知识分享 #家长收藏孩子受益 #关注我持续更新小学知识.pdf
- 二年级数学下册《重点难点思维题》两大问题解决技巧和方法巧算星期几解决周期问题还原问题强化思维训练老师精心整理家长可以打印出来给孩子练习#家长收藏孩子受益 #学霸秘籍 #思维训练 #二年级 #知识点总结.pdf
- 二年级数学下册 必背公式大全寒假提前背一背开学更轻松#二年级 #二年级数学 #二年级数学下册 #寒假充电计划 #公式.pdf


