📄 main.cpp
字号:
#include "1.h"
void menu()
{void check();
void in();
void in_sto();
void input();
void out();
void store();
void stu_buy();
void unpass();
void wait();
void dis_in();
void help();
void del();//声明
while(1)
{ system("cls");
printf("1.学生进入\n");
printf("2.管理人员进入\n");
printf("3.查看帮助文件\n");
printf("0.退出系统\n");
char choice[10];
printf("请输入你的选择:");
scanf("%s",choice);getchar();
switch(choice[0])
{case '1':while(1){
system("cls");
printf("1.购书\n");
printf("2.显示库存\n");
printf("3.返回上一层\n");
printf("4.查看帮助文件\n");
printf("0.退出系统\n\n");
printf("请输入你的选择:");
scanf("%s",choice);getchar();
if(choice[0]=='1'){system("cls");input();check();unpass();}
else if(choice[0]=='2') {system("cls");store(); }
else if(choice[0]=='3') {menu();}
else if(choice[0]=='4') {system("cls");help();}
else if(choice[0]=='0') exit(0);
}
case '2':while(1){system("cls");
printf("1.有新书入库\n");
printf("2.显示所有入库记录\n");
printf("3.显示所有出库记录\n");
printf("4.显示库存\n");
printf("5.显示待购表\n");
printf("6.显示所有通过审核的购书清单\n");
printf("7.返回上一层\n");
printf("8.书本注销(删除记录)\n");
printf("9.查看帮助文件\n");
printf("0.退出系统\n\n");
printf("请输入你的选择:");
scanf("%s",choice);getchar();
switch(choice[0]){
case '1':in();in_sto();break;
case '2':system("cls");dis_in();break;
case '3':system("cls");out();break;
case '4':system("cls");store();break;
case '5':system("cls");wait();break;
case '6':system("cls");stu_buy();break;
case '7':menu();
case '8':system("cls");del();break;
case '9':system("cls");help();
case '0':exit(0);
}//switch
}
case '3':{system("cls");help();break;}
case '0':exit(0);}//switch
}
}
void main()
{void help();
int help1=0;
FILE *fp;
fp=fopen("help.txt","r");
fread(&help1,sizeof(int),1,fp);
if(help1)
help();
fclose(fp);
menu();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -