#include
#include
#include
#define true 1
struct student
{
char name[60];
char ID[7];
int score;
};
int dq(struct student st[]);
void xianshi();
void bc(struct student st[]);
void add();
void select();
void zz();
void chazhao();
void xhcz();
void xmcz();
void del();
void xmsc();
void xhsc();
void tj();
void bjg();
void xg();
void xhxg();
void xmxg();
void bca();
void fh();
struct student st[300];
int Number=0;
void main()
{
int choose=0;
FILE *fp=NULL;
char yesorno;
if((fp=fopen("C://student.dat","rb"))==NULL)
{
printf("\n=========>提示:文件不存在,是否要创建一个?(y/n)\n");
scanf("%c",&yesorno);
if(yesorno=='y'||yesorno=='Y')
{
fp=fopen("C://student.dat","wb");
fclose(fp);
}
else
exit(0);
}
else
{
Number=dq(st);
}
system("cls");
while(true)
{
xianshi();
printf("\t\t====>请选择:");
scanf("%d",&choose);
system("cls");
switch(choose)
{
case 0: exit(0);fh();break;
case 1: add();fh();break;
case 2: select();fh();break;
case 3: chazhao();fh();break;
case 4: del();fh();break;
case 5: tj();fh();break;
case 6: bjg();fh();break;
case 7: xg();fh();break;
case 8:zz();fh();break;
case 9:bca();break;
default:break;
}
fflush(stdin);
getchar();
system("cls");
}
}
void bca()
{
printf("\t=====程序在运行时已自动保存.....\n");
}