数据库课程设计c
⑴ 数据结构课程设计(基于C) 图书管理系统
头文件:
============
#ifndef _DATA_STRUCT_H_
#define _DATA_STRUCT_H_
/*图书结构*/
struct Book
{
unsigned long BookID;/*图书编号*/
char BookName[512];/*书名*/
char Writer[512];/*作者*/
int CurrentNumber;/*现存量*/
Book *pNext;/*下一个图书信息*/
};
/*图书索引结构*/
struct Index
{
unsigned long BookID;/*图书编号*/
Index *pNext;/*下一个索引指针*/
};
/*借阅信息结构*/
struct Borrow
{
unsigned long BookID;/*借阅图书编号*/
char BookName[512];/*书名*/
unsigned long StuID;/*图书证号*/
char ReturnTime[512];/*归还日期*/
Borrow *pNext;/*下一个借阅信息*/
};
#endif/*_DATA_STRUCT_H_*/
实现文件:
===============
// BookManage.cpp : 定义控制台应用程序的入口点。
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "DataStruct.h"
/*
数据结构课程设计(基于C) 图书管理系统
悬赏分:100 - 离问题结束还有 14 天 23 小时
【问题描述】
图书管理基本业务活动包括,对一本书的采编入库、清楚库存、借阅和归还等等。试设计一个图书管理系统,将上述业务活动借助于计算机系统完成。
【基本要求】
(1) 每种书的登记至少包括书号春前好书名作者现存量总库存量5项
(2)对书号建立索引表(线性表)以提高查找效率
(3) 系统要实现的操作及其功能定义如下:
1 采编入库:新购入一种书,经分类和确定数好之后登记到图书馆账目中去。如果这种书在账户中已有,则只将总库存量增加。
2借阅:如果一本书的现存量悔友大于零,则借出一本,登出借阅者的图书证扒铅号和归还日期
3归还:注销对借阅者的登记,改变该书的现存量
*/
/*获取输入字符串*/
void GetInput(char *pInOutStr,int StrLen,bool OnlyGetNumber = false);
/*显示主菜单 并返回选择*/
int ShowMainMenu();
/*图书入库操作,传入参数为图书列表头指针的指针和索引信息的头指针的指针,因为在此函数内部可能会改变头指针的值*/
void PutBookInLib(Book **pHead,Index **pIndex);
/*查询图书馆库存,查询不改变数据,故传入指针即可*/
void QueryBookLib(Book *pHead);
/*借阅图书*/
void BorrowBook(Borrow **pBorrow,Book *pHead);
/*查询借阅*/
void QueryBorrow(Borrow *pBorrow);
/*归还图书*/
void ReturnBook(Borrow **pBorrow,Book *pHead);
/*释放图书链表及索引链表及借阅信息链表*/
void DeleteBookList(Book **pHead);
void DeleteIndexList(Index **pIndex);
void DeleteBorrowList(Borrow **pBorrow);
int main()
{
/*图书列表头指针*/
Book *pBookHead = NULL;
/*图书索引头指针*/
Index *pIndexHead = NULL;
/*借阅信息头指针*/
Borrow *pBorrowHead = NULL;
/*用来保存当前用户的输入*/
int ChoosedNum = -1;
while ( true )
{
ChoosedNum = ShowMainMenu();
switch(ChoosedNum)
{
case 0 :/*退出*/
{
return 0;
break;
}
case 1:/*图书入库*/
{
PutBookInLib(&pBookHead,&pIndexHead);
break;
}
case 2:/*查询库存*/
{
QueryBookLib(pBookHead);
printf("按回车键继续...");
fflush(stdin);
getchar();
system("cls");
break;
}
case 3:/*借阅图书*/
{
QueryBookLib(pBookHead);
BorrowBook(&pBorrowHead,pBookHead);
break;
}
case 4:/*查询借阅*/
{
QueryBorrow(pBorrowHead);
printf("按回车键继续...");
fflush(stdin);
getchar();
system("cls");
break;
}
case 5:/*归还图书*/
{
QueryBorrow(pBorrowHead);
ReturnBook(&pBorrowHead,pBookHead);
break;
}
}
}
DeleteBookList(&pBookHead);
DeleteIndexList(&pIndexHead);
DeleteBorrowList(&pBorrowHead);
fflush(stdin);
getchar();
return 0;
}
/*获取输入字符串*/
void GetInput(char *pInOutStr,int StrLen,bool OnlyGetNumber)
{
memset(pInOutStr,0x0,StrLen);
fflush(stdin);
int Count = 0;
while ( true )
{
char TmpC = 0;
fread(&TmpC,1,1,stdin);
if ( 10 == TmpC )
{
break;
}
if ( OnlyGetNumber && TmpC >= '0' && TmpC <= '9' )
{
pInOutStr[Count] = TmpC;
Count++;
}
else
{
pInOutStr[Count] = TmpC;
Count++;
}
}
}
/*显示主菜单 并返回选择*/
int ShowMainMenu()
{
char InPutStr[1024];
NO_INPUT:
printf("\n\n\n");
printf("******************************************************************\n");
printf("* 图书管理系统 *\n");
printf("******************************************************************\n");
printf("\n");
printf("请选择:\n");
printf("\t1.图书入库\n");
printf("\t2.查询库存\n");
printf("\t3.借阅图书\n");
printf("\t4.查询借阅\n");
printf("\t5.归还图书\n");
printf("\t0.退出\n");
printf("\n");
printf("\t输入 : ");
GetInput(InPutStr,1024,true);
if ( strlen(InPutStr) < 1 )
{
system("cls");
goto NO_INPUT;
}
return atoi(InPutStr);
}
/*图书入库操作*/
void PutBookInLib(Book **pHead,Index **pIndex)
{
Book *pWork = *pHead;
unsigned long BookID = 1;
char InPutStr[1024];
/*先计算处当前入库图书的ID号*/
if ( NULL == pWork )
{
BookID = 1;
}
else
{
while ( pWork->pNext != NULL )
{
pWork = pWork->pNext;
}
BookID = pWork->BookID + 1;
}
Book *pTmpNewBook = (Book *)(malloc(sizeof(Book)));
memset(pTmpNewBook,0x0,sizeof(Book));
Index *pTmpIndex = (Index *)(malloc(sizeof(Index)));
memset(pTmpIndex,0x0,sizeof(Index));
pTmpNewBook->BookID = BookID;
pTmpIndex->BookID = BookID;
system("cls");
printf("输入图书名称 : ");
GetInput(InPutStr,1024);
strcpy(pTmpNewBook->BookName,InPutStr);
system("cls");
printf("<<%s>>\n",pTmpNewBook->BookName);
printf("图书作者 : ");
GetInput(InPutStr,1024);
strcpy(pTmpNewBook->Writer,InPutStr);
system("cls");
printf("<<%s>>\n",pTmpNewBook->BookName);
printf("作者:%s\n",pTmpNewBook->Writer);
printf("入库数量 : ");
GetInput(InPutStr,1024,true);
pTmpNewBook->CurrentNumber = atoi(InPutStr);
if ( pTmpNewBook->CurrentNumber < 1 )
{
system("cls");
printf("入库数量错误!(按回车键继续...)");
fflush(stdin);
getchar();
system("cls");
return;
}
if ( NULL == *pHead )
{
*pHead = pTmpNewBook;
*pIndex = pTmpIndex;
}
else
{
Book *pWork = *pHead;
while ( pWork != NULL )
{
if ( strcmp(pWork->BookName,pTmpNewBook->BookName) == 0 && strcmp(pWork->Writer,pTmpNewBook->Writer) == 0 )
{
pWork->CurrentNumber += pTmpNewBook->CurrentNumber;
return;
}
pWork = pWork->pNext;
}
pWork = *pHead;
while ( pWork->pNext != NULL )
{
pWork = pWork->pNext;
}
pWork->pNext = pTmpNewBook;
Index *pWork2 = *pIndex;
while ( pWork2->pNext != NULL )
{
pWork2 = pWork2->pNext;
}
pWork2->pNext = pTmpIndex;
}
system("cls");
printf("图书:<<%s>>\n作者:%s\n入库数:%d\n\n入库操作成功!(按回车键继续...)",pTmpNewBook->BookName,pTmpNewBook->Writer,pTmpNewBook->CurrentNumber);
fflush(stdin);
getchar();
system("cls");
}
/*释放图书链表及索引链表*/
void DeleteBookList(Book **pHead)
{
Book *pWork = *pHead;
Book *pNext = pWork;
while ( NULL != pWork )
{
pNext = pWork->pNext;
free(pWork);
pWork = pNext;
}
}
void DeleteIndexList(Index **pIndex)
{
Index *pWork = *pIndex;
Index *pNext = pWork;
while ( NULL != pWork )
{
pNext = pWork->pNext;
free(pWork);
pWork = pNext;
}
}
void DeleteBorrowList(Borrow **pBorrow)
{
Borrow *pWork = *pBorrow;
Borrow *pNext = pWork;
while ( NULL != pWork )
{
pNext = pWork->pNext;
free(pWork);
pWork = pNext;
}
}
/*查询图书馆库存,查询不改变数据,故传入指针即可*/
void QueryBookLib(Book *pHead)
{
Book *pWork = pHead;
int TotalCount = 0;
while ( NULL != pWork )
{
TotalCount++;
pWork = pWork->pNext;
}
system("cls");
printf("当前库存共%d种图书,列表如下:\n=====================================================\n",TotalCount);
pWork = pHead;
while ( NULL != pWork )
{
printf("编号:[%d] 书名:<<%s>> 作者:%s 当前库存:%d\n",pWork->BookID,pWork->BookName,pWork->Writer,pWork->CurrentNumber);
pWork = pWork->pNext;
}
printf("=====================================================\n",TotalCount);
}
/*借阅图书*/
void BorrowBook(Borrow **pBorrow,Book *pHead)
{
char InPutStr[1024];
bool HadTheBook = false;
Borrow *pTmpBorrow = (Borrow *)(malloc(sizeof(Borrow)));
memset(pTmpBorrow,0x0,sizeof(Borrow));
printf("请输入你想借书的编号 : ");
GetInput(InPutStr,1024,true);
pTmpBorrow->BookID = atoi(InPutStr);
Book *pWorkBook = pHead;
while ( pWorkBook != NULL )
{
if ( pWorkBook->BookID == pTmpBorrow->BookID )
{
HadTheBook = true;
break;
}
pWorkBook = pWorkBook->pNext;
}
if ( HadTheBook )
{
if ( pWorkBook->CurrentNumber < 1 )
{
system("cls");
printf("图书<<%s>>当前无库存,无法借阅!\n(按回车键继续...)",pWorkBook->BookName);
fflush(stdin);
getchar();
system("cls");
free(pTmpBorrow);
return;
}
}
else
{
system("cls");
printf("图书编号%d不存在!\n(按回车键继续...)",pTmpBorrow->BookID);
fflush(stdin);
getchar();
system("cls");
free(pTmpBorrow);
return;
}
strcpy(pTmpBorrow->BookName,pWorkBook->BookName);
printf("请输入借书证号 : ");
GetInput(InPutStr,1024,true);
pTmpBorrow->StuID = atoi(InPutStr);
if ( 0 == pTmpBorrow->StuID )
{
system("cls");
printf("借书证号不存在(借书证号输入整数)!\n(按回车键继续...)");
fflush(stdin);
getchar();
system("cls");
free(pTmpBorrow);
return;
}
time_t ltime;
struct tm *today;
time(<ime);
ltime += 60 * 60 * 24 * 30;
today = localtime(<ime);
sprintf(pTmpBorrow->ReturnTime,"%d年%d月%d日", today->tm_year+1900,
today->tm_mon+1,
today->tm_mday);
if ( *pBorrow == NULL )
{
*pBorrow = pTmpBorrow;
}
else
{
Borrow *pWork = *pBorrow;
while ( NULL != pWork->pNext )
{
pWork = pWork->pNext;
}
pWork->pNext = pTmpBorrow;
}
pWorkBook->CurrentNumber--;
system("cls");
printf("借书证号:%d\n借阅图书:<<%s>>\n\n操作成功!(按回车键继续...)",pTmpBorrow->StuID,pTmpBorrow->BookName);
fflush(stdin);
getchar();
system("cls");
}
/*查询借阅*/
void QueryBorrow(Borrow *pBorrow)
{
Borrow *pWork = pBorrow;
int TotalCount = 0;
while ( NULL != pWork )
{
TotalCount++;
pWork = pWork->pNext;
}
system("cls");
printf("当前借阅信息共%d条,列表如下:\n=====================================================\n",TotalCount);
pWork = pBorrow;
while ( NULL != pWork )
{
printf("借数证号:[%d] 借书名:<<%s>> 图书编号:%d 归还日期:%s\n",pWork->StuID,pWork->BookName,pWork->BookID,pWork->ReturnTime);
pWork = pWork->pNext;
}
printf("=====================================================\n",TotalCount);
}
/*归还图书*/
void ReturnBook(Borrow **pBorrow,Book *pHead)
{
char InPutStr[1024];
Borrow TmpBorrow;
bool HasFindBorrwo = false;
memset(&TmpBorrow,0x0,sizeof(TmpBorrow));
printf("请输入借书证号 : ");
GetInput(InPutStr,1024,true);
TmpBorrow.StuID = atoi(InPutStr);
printf("请输入所还图书编号 : ");
GetInput(InPutStr,1024,true);
TmpBorrow.BookID = atoi(InPutStr);
Borrow *pWorkBorrow = *pBorrow;
Borrow *pDeletePre = NULL;
while ( NULL != pWorkBorrow )
{
if ( pWorkBorrow->BookID == TmpBorrow.BookID && pWorkBorrow->StuID == TmpBorrow.StuID )
{
HasFindBorrwo = true;
break;
}
pDeletePre = pWorkBorrow;
pWorkBorrow = pWorkBorrow->pNext;
}
if ( ! HasFindBorrwo )
{
system("cls");
printf("你输入的借书信息不存在!\n(按回车键继续...)");
fflush(stdin);
getchar();
system("cls");
return;
}
if ( NULL == pDeletePre )
{
*pBorrow = pWorkBorrow->pNext;
}
else
{
pDeletePre->pNext = pWorkBorrow->pNext;
}
Book *pWorkBook = pHead;
while ( NULL != pWorkBook )
{
if ( pWorkBook->BookID == pWorkBorrow->BookID )
{
pWorkBook->CurrentNumber ++;
}
pWorkBook = pWorkBook->pNext;
}
system("cls");
printf("借书证号:%d\n归还图书:<<%s>>\n\n操作成功!(按回车键继续...)",pWorkBorrow->StuID,pWorkBorrow->BookName);
fflush(stdin);
getchar();
system("cls");
free(pWorkBorrow);
}
⑵ 图书馆管理系统 数据结构课程设计 c语言
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
struct books_list
{
char author[20]; /*作者名*/
char bookname[20]; /*书名*/
char publisher[20]; /*出版单位*/
char pbtime[15]; /*出版时间*/
char loginnum[10]; /*登陆号*/
float price; /*价格*/
char classfy[10]; /*分类号*/
struct books_list * next; /*链表的指针域*/
};
struct books_list * Create_Books_Doc(); /*新建链表*/
void InsertDoc(struct books_list * head); /*插入*/
void DeleteDoc(struct books_list * head , int num);/*删除*/
void Print_Book_Doc(struct books_list * head);/*浏览*/
void search_book(struct books_list * head); /*查询*/
void info_change(struct books_list * head);/*修改*/
void save(struct books_list * head);/*保存数据至文件*/
/*新建链表头节点*/
struct books_list * Create_Books_Doc()
{
struct books_list * head;
head=(struct books_list *)malloc(sizeof(struct books_list)); /*分配头节点空间*/
head->next=NULL; /*头节点指针域初始化,定为空*/
return head;
}
/*保存数据至文件*/
void save(struct books_list * head)
{
struct books_list *p;
FILE *fp;
p=head;
fp=fopen("data.txt","w+"); /*以写方式新建并打开 data.txt文件*/
fprintf(fp,"┏━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━━┳━━━┳━━━━┓\n"); /*向文件输出表格*/
fprintf(fp,"┃登录号┃ 书 名 ┃ 作 者┃ 出版单位 ┃ 出版时间 ┃分类号┃ 价格 ┃\n");
fprintf(fp,"┣━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━━╋━━━╋━━━━┫\n");
/*指针从头节点开始移动,遍历至尾结点,依次输出图书信息*/
while(p->next!= NULL)
{
p=p->next;
fprintf(fp,"┃%-6.6s┃%-10.10s┃%-10.10s┃%-10.10s┃%-12.12s┃%-6.6s┃%.2f ┃\n",p->loginnum,p->bookname,p->author,p->publisher,p->pbtime,p->classfy,p->price);
}
fprintf(fp,"┗━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━━┻━━━┻━━━━┛\n");
fclose(fp);
printf(" 已将图书数据保存到 data.txt 文件\n");
}
/*插入*/
void InsertDoc(struct books_list *head)
{
/*定义结构体指针变量 s指向开辟的新结点首地址 p为中间变量*/
struct books_list *s, *p;
char flag='Y'; /*定义flag,方便用户选择重复输入*/
p=head;
/*遍历到尾结点,p指向尾结点*/
while(p->next!= NULL)
{
p=p->next;
}
/*开辟新空间,存入数据,添加进链表*/
while(flag=='Y'||flag=='y')
{
s=(struct books_list *)malloc(sizeof(struct books_list));
printf("\n 请输入图书登陆号:");
fflush(stdin);
scanf("%s",s->loginnum);
printf("\n 请输入图书书名:");
fflush(stdin);
scanf("%s",s->bookname);
printf("\n 请输入图书作者名:");
fflush(stdin);
scanf("%s",s->author);
printf("\n 请输入图书出版社:");
fflush(stdin);
scanf("%s",s->publisher);
printf("\n 请输入图书出版时间:");
fflush(stdin);
scanf("%s",s->pbtime);
printf("\n 请输入图书分类号:");
fflush(stdin);
scanf("%s",s->classfy);
printf("\n 请输入图书价格:");
fflush(stdin);
scanf("%f",&s->price);
printf("\n");
p->next=s; /*将新增加的节点添加进链表*/
p=s; /*p指向尾节点,向后移*/
s->next=NULL;
printf(" ━━━━ 添加成功!━━━━");
printf("\n 继续添加?(Y/N):");
fflush(stdin);
scanf("%c",&flag);
printf("\n");
if(flag=='N'||flag=='n')
{break;}
else if(flag=='Y'||flag=='y')
{continue;}
}
save(head); /*保存数据至文件*/
return;
}
/*查询操作*/
void search_book(struct books_list *head)
{
struct books_list * p;
char temp[20];
p=head;
if(head==NULL || head->next==NULL) /*判断数据库是否为空*/
{
printf(" ━━━━ 图书库为空!━━━━\n");
}
else
{
printf("请输入您要查找的书名: ");
fflush(stdin);
scanf("%s",temp);
/*指针从头节点开始移动,遍历至尾结点,查找书目信息*/
while(p->next!= NULL)
{
p=p->next;
if(strcmp(p->bookname,temp)==0)
{
printf("\n图书已找到!\n");
printf("\n");
printf("登录号: %s\t\n",p->loginnum);
printf("书名: %s\t\n",p->bookname);
printf("作者名: %s\t\n",p->author);
printf("出版单位: %s\t\n",p->publisher);
printf("出版时间: %s\t\n",p->pbtime);
printf("分类号: %s\t\n",p->classfy);
printf("价格: %.2f\t\n",p->price);
}
if(p->next==NULL)
{
printf("\n查询完毕!\n");
}
}
}
return;
}
/*浏览操作*/
void Print_Book_Doc(struct books_list * head)
{
struct books_list * p;
if(head==NULL || head->next==NULL) /*判断数据库是否为空*/
{
printf("\n ━━━━ 没有图书记录! ━━━━\n\n");
return;
}
p=head;
printf("┏━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━━┳━━━┳━━━━┓\n");
printf("┃登录号┃ 书 名 ┃ 作 者┃ 出版单位 ┃ 出版时间 ┃分类号┃ 价格 ┃\n");
printf("┣━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━━╋━━━╋━━━━┫\n");
/*指针从头节点开始移动,遍历至尾结点,依次输出图书信息*/
while(p->next!= NULL)
{
p=p->next;
printf("┃%-6.6s┃%-10.10s┃%-10.10s┃%-10.10s┃%-12.12s┃%-6.6s┃%.2f ┃\n",p->loginnum,p->bookname,p->author,p->publisher,p->pbtime,p->classfy,p->price); /*循环输出表格*/
}
printf("┗━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━━┻━━━┻━━━━┛\n");
printf("\n");
}
/*修改操作*/
void info_change(struct books_list * head)
{
struct books_list * p;
int panan=0; /*此变量用于判断是否找到书目*/
char temp[20];
p=head;
printf("请输入要修改的书名:");
scanf("%s",temp);
while(p->next!= NULL)
{
p=p->next;
if(strcmp(p->bookname,temp)==0)
{
printf("\n 请输入图书登陆卡号:");
fflush(stdin);
scanf("%s",p->loginnum);
printf("\n 请输入图书书名:");
fflush(stdin);
scanf("%s",p->bookname);
printf("\n 请输入图书作者名:");
fflush(stdin);
scanf("%s",p->author);
printf("\n 请输入图书出版社:");
fflush(stdin);
scanf("%s",p->publisher);
printf("\n 请输入图书出版时间:");
fflush(stdin);
scanf("%s",p->pbtime);
printf("\n 请输入图书分类号:");
fflush(stdin);
scanf("%s",p->classfy);
printf("\n 请输入图书价格:");
fflush(stdin);
scanf("%f",&p->price);
printf("\n");
panan=1;
}
}
if(panan==0)
{
printf("\n ━━━━ 没有图书记录! ━━━━\n\n");
}
return;
}
/*删除操作*/
void DeleteDoc(struct books_list * head)
{
struct books_list *s,*p; /*s为中间变量,p为遍历时使用的指针*/
char temp[20];
int panan; /*此变量用于判断是否找到了书目*/
panan=0;
p=s=head;
printf(" [请输入您要删除的书名]:");
scanf("%s",temp);
/*遍历到尾结点*/
while(p!= NULL)
{
if(strcmp(p->bookname,temp)==0)
{
panan++;
break;
}
p=p->next;
}
if(panan==1)
{
for(;s->next!=p;) /*找到所需删除卡号结点的上一个结点*/
{
s=s->next;
}
s->next=p->next; /*将后一节点地址赋值给前一节点的指针域*/
free(p);
printf("\n ━━━━ 删除成功! ━━━━\n");
}
else /*未找到相应书目*/
{
printf(" 您输入的书目不存在,请确认后输入!\n");
}
return;
}
int main(void)
{
struct books_list * head;
char choice;
head=NULL;
for(;;) /*实现反复输入选择*/
{
printf(" ┏━┓━━━━━━━━━━━━━━━━━━━┏━┓\n");
printf(" ┃ ┃ socat 图书管理系统 ┃ ┃\n");
printf(" ┃ ┗━━━━━━━━━━━━━━━━━━━┛ ┃\n");
printf(" ┃ ●[1]图书信息录入 ┃\n");
printf(" ┃ ┃\n");
printf(" ┃ ●[2]图书信息浏览 ┃\n");
printf(" ┃ ┃\n");
printf(" ┃ ●[3]图书信息查询 ┃\n");
printf(" ┃ ┃\n");
printf(" ┃ ●[4]图书信息修改 ┃\n");
printf(" ┃ ┃\n");
printf(" ┃ ●[5]图书信息删除 ┃\n");
printf(" ┃ ┃\n");
printf(" ┃ ●[6]退出系统 ┃\n");
printf(" ┗━━━━━━━━━━━━━━━━━━━━━━━┛\n");
printf(" 请选择:");
fflush(stdin);
scanf("%c",&choice);
if(choice=='1')
{
if(head==NULL)
{
head=Create_Books_Doc();
}
InsertDoc(head);
}
else if(choice=='2')
{
Print_Book_Doc(head);
}
else if(choice=='3')
{
search_book(head);
}
else if(choice=='4')
{
info_change(head);
}
else if(choice=='5')
{
DeleteDoc(head);
}
else if(choice=='6')
{
printf("\n");
printf(" ━━━━━━━━ 感谢使用图书管理系统 ━━━━━━━━\n");
break;
}
else
{
printf(" ━━━━ 输入错误,请重新输入!━━━━");
break;
}
}
return 0;
}