You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pa63emhpl/学生管理系统.ncb

374 lines
12 KiB

6 years ago
#include"stdio.h"
#include"string.h"
#include"stdlib.h"
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
void luru();
void liulan();
void xiugai();
void chaxun();
void shanchu();
void chongxie();
void paixu();
/*<2A><>¼ѧ<C2BC><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
int student=0;
/*ѧ<><D1A7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B9B9>*/
struct student { //<2F><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ<EFBFBD>Ľṹ<C4BD><E1B9B9>
char xuehao[12]; //<2F><><EFBFBD><EFBFBD>11λѧ<CEBB><D1A7>
char ming[10]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
char xingbie; //<2F><><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>fΪŮ<CEAA>ԣ<EFBFBD><6D><CEAA><EFBFBD><EFBFBD>
char chusheng[8]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>£<EFBFBD><C2A3><EFBFBD>ʽΪyyyy.mm<6D><6D><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>Ϊ<EFBFBD><CEAA>˽<EFBFBD><CBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>****.**
int nianling; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E4A3AC><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㣬00<30><30>ʾ<EFBFBD><CABE>˽
char dizhi[6]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Һ<EFBFBD> <20><>ʽΪx(<28><>)-yyy
char dianhua[12]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7BBB0><EFBFBD><EFBFBD>
char email[31]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ <20><>Ҫ<EFBFBD><D2AA>Ϊ<EFBFBD><CEAA>˽<EFBFBD><CBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*
};
#define size 10 //<2F><><EFBFBD><EFBFBD><E0B4A2>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>
struct student stu[size]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int i=0; //<2F><><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD><D0B3><EFBFBD>
int main() {
int a;
while(1) { //<2F><>ʼѭ<CABC><D1AD>
printf("|--------------------------|\n");
printf("|<7C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD>¹<EFBFBD><C2B9><EFBFBD>|\n");
printf("| <20><><EFBFBD><EFBFBD>1:¼<><C2BC>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ |\n");
printf("| <20><><EFBFBD><EFBFBD>2:<3A><><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ |\n");
printf("| <20><><EFBFBD><EFBFBD>3:<3A>޸<EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ |\n");
printf("| <20><><EFBFBD><EFBFBD>4:<3A><>ѯѧ<D1AF><D1A7><EFBFBD><EFBFBD>Ϣ |\n");
printf("| <20><><EFBFBD><EFBFBD>5:ɾ<><C9BE>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ |\n");
printf("| <20><><EFBFBD><EFBFBD>6:<3A><>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD> |\n");
printf("| <20><><EFBFBD><EFBFBD>7:<3A>رճ<D8B1><D5B3><EFBFBD> |\n");
printf("|--------------------------|\n");
scanf("%d",&a);
fflush(stdin); //fflush(stdin);<3B><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>Ļس<C4BB><D8B3><EFBFBD>Ӱ<EFBFBD><EFBFBD><ECB5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
switch(a) {
case 1:
system("cls"); //system("cls");<3B><><EFBFBD><EFBFBD>
luru();
break;
case 2:
system("cls");
liulan();
break;
case 3:
system("cls");
xiugai();
break;
case 4:
system("cls");
chaxun();
break;
case 5:
system("cls");
shanchu();
break;
case 6:
system("cls");
paixu();
break;
case 7:
return 0; //ǿ<>йرճ<D8B1><D5B3><EFBFBD>
default: {
system("cls");
printf("<22><><EFBFBD><EFBFBD>!<21><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>!<21><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!\n");
break;
}
}
}
return 0;
}
void chongxie() {
int j; //<2F><><EFBFBD><EFBFBD>forѭ<72><D1AD>
FILE *fp=fopen("student.txt","w+"); //<2F><><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
if(fp==NULL) //<2F>ж<EFBFBD><D0B6>ܷ<EFBFBD><DCB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
printf("ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>!");
for(j=0; j<student; j++)
fprintf(fp,"%s %s %c %s %d %s %s %s\n",stu[j].xuehao,stu[j].ming,stu[j].xingbie,stu[j].chusheng,stu[j].nianling,stu[j].dizhi,stu[j].dianhua,stu[j].email);
fclose(fp);
}
void luru() {
printf("|---------<2D>Ѽ<EFBFBD><D1BC><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>----------|\n");
if(i==0) { //<2F>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA>һ<EFBFBD>δ<EFBFBD><CEB4><EFBFBD>
FILE *fp;
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>иó<D0B8><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ\n");
i++;
fp=fopen("f1.txt","r");
if(fp==NULL) //<2F>ж<EFBFBD><D0B6>ļ<EFBFBD><C4BC>ܷ<EFBFBD><DCB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
printf("ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>!\n");
while(!feof(fp)&&student<size) { //<2F><><EFBFBD>ļ<EFBFBD><C4BC>е<EFBFBD><D0B5><EFBFBD>Ϣһ<CFA2><D2BB><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>壬ֱ<E5A3AC><D6B1><EFBFBD><EFBFBD><EFB5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E6B4A2>
fscanf(fp,"%s %s %c %s %d %s %s %s",stu[student].xuehao,stu[student].ming,&stu[student].xingbie,stu[student].chusheng,&stu[student].nianling,stu[student].dizhi,stu[student].dianhua,stu[student].email);
student++; //ѧ<><D1A7><EFBFBD><EFBFBD>+1
}
fclose(fp); //<2F>ر<EFBFBD><D8B1>ļ<EFBFBD>
printf("|-----------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>--------------|\n");
return;
} else {
int c; //c=1<><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ
printf("ȷ<><C8B7>Ҫ¼<D2AA><C2BC><EFBFBD>µ<EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1ѡ<31><D1A1><EFBFBD>ǣ<EFBFBD><C7A3><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>\n");
scanf("%d",&c);
while(c==1) { //<2F><><EFBFBD><EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ
if(student==size) {
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!<21>޷<EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD>\n");
return;
} else {
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>11λѧ<CEBB><D1A7>\n");
scanf("%s",stu[student].xuehao); //fflush(stdin);<3B><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>Ļس<C4BB><D8B3><EFBFBD>Ӱ<EFBFBD><EFBFBD><ECB5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
fflush(stdin);
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
scanf("%s",stu[student].ming);
fflush(stdin);
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD>Ա<EFBFBD>\n");
scanf("%c",&stu[student].xingbie);
fflush(stdin);
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
scanf("%s",stu[student].chusheng);
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
scanf("%d",&stu[student].nianling);
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>ַ\n");
scanf("%s",stu[student].dizhi);
fflush(stdin);
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><E7BBB0><EFBFBD><EFBFBD>\n");
scanf("%s",stu[student].dianhua);
fflush(stdin);
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ\n");
scanf("%s",stu[student].email);
fflush(stdin);
student++; //ѧ<><D1A7><EFBFBD><EFBFBD>+1
printf("<22>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>µ<EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1ѡ<31><D1A1><EFBFBD>ǣ<EFBFBD><C7A3><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>\n");
scanf("%d",&c);
}
}
}
chongxie(); //<2F><><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
system("cls");
return;
}
void liulan() {
char g;
printf("|---------<2D>ѽ<EFBFBD><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>----------|\n");
int j; //<2F><><EFBFBD><EFBFBD>forѭ<72><D1AD>
printf("ѧ<><D1A7> <09><><EFBFBD><EFBFBD> <09>Ա<EFBFBD> <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <09><><EFBFBD><EFBFBD> <09><>ַ <09><EFBFBD><E7BBB0><EFBFBD><EFBFBD> E-mail<69><6C><EFBFBD><EFBFBD>\n"); //<2F>Ʊ<EFBFBD>
for(j=0; j<student; j++) //<2F><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
printf("%s\t%s\t\t%c\t%s\t\t%d\t%s\t%s\t%s\n",stu[j].xuehao,stu[j].ming,stu[j].xingbie,stu[j].chusheng,stu[j].nianling,stu[j].dizhi,stu[j].dianhua,stu[j].email);
printf("|-----------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>--------------|\n");
printf("|--------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>-------------|\n");
g=getchar(); //<2F><><EFBFBD><EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
system("cls");
return;
}
void xiugai() {
printf("|---------<2D>ѽ<EFBFBD><D1BD><EFBFBD><EFBFBD>޸ij<DEB8><C4B3><EFBFBD>----------|\n");
int a,j; //a<><61><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>j<EFBFBD><6A><EFBFBD><EFBFBD>forѭ<72><D1AD>
char g;
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>޸<EFBFBD><DEB8><EFBFBD>Ϣ<EFBFBD><CFA2>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7>\n");
char x[12]; //<2F><><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7>
scanf("%s",x);
if(strlen(x)!=11) { //<2F><><EFBFBD><EFBFBD>11λֱ<CEBB><D6B1><EFBFBD>ж<EFBFBD>Ϊ<EFBFBD><CEAA>ʽ<EFBFBD><CABD><EFBFBD>󣬽<EFBFBD><F3A3ACBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
printf("<22><>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>!\n");
printf("|-----------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>--------------|\n");
return;
}
for(j=0; j<student; j++)
if(strcmp(x,stu[j].xuehao)==0) {
printf("<22><><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>ͬѧ<CDAC><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n1:<3A>޸<EFBFBD>ѧ<EFBFBD><D1A7>\n2:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n3:<3A>޸<EFBFBD><DEB8>Ա<EFBFBD>\n4:<3A>޸ij<DEB8><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n5:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n6:<3A>޸ĵ<DEB8>ַ\n7:<3A>޸ĵ绰<C4B5><E7BBB0><EFBFBD><EFBFBD>\n8:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n<><6E><EFBFBD><EFBFBD>:<3A>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>\n");
while(scanf("%d",&a)!=EOF)
switch(a) {
case 1:
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD>ѧ<EFBFBD><D1A7>\n");
scanf("%s",stu[j].xuehao);
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n1:<3A>޸<EFBFBD>ѧ<EFBFBD><D1A7>\n2:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n3:<3A>޸<EFBFBD><DEB8>Ա<EFBFBD>\n4:<3A>޸ij<DEB8><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n5:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n6:<3A>޸ĵ<DEB8>ַ\n7:<3A>޸ĵ绰<C4B5><E7BBB0><EFBFBD><EFBFBD>\n8:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n<><6E><EFBFBD><EFBFBD>:<3A>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>\n");
break;
case 2:
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD><C2B5><EFBFBD><EFBFBD><EFBFBD>\n");
scanf("%s",stu[j].ming);
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n1:<3A>޸<EFBFBD>ѧ<EFBFBD><D1A7>\n2:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n3:<3A>޸<EFBFBD><DEB8>Ա<EFBFBD>\n4:<3A>޸ij<DEB8><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n5:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n6:<3A>޸ĵ<DEB8>ַ\n7:<3A>޸ĵ绰<C4B5><E7BBB0><EFBFBD><EFBFBD>\n8:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n<><6E><EFBFBD><EFBFBD>:<3A>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>\n");
break;
case 3:
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD><C2B5>Ա<EFBFBD>\n");
fflush(stdin); //fflush(stdin);<3B><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>Ļس<C4BB><D8B3><EFBFBD>Ӱ<EFBFBD><EFBFBD><ECB5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
scanf("%c",&stu[j].xingbie);
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n1:<3A>޸<EFBFBD>ѧ<EFBFBD><D1A7>\n2:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n3:<3A>޸<EFBFBD><DEB8>Ա<EFBFBD>\n4:<3A>޸ij<DEB8><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n5:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n6:<3A>޸ĵ<DEB8>ַ\n7:<3A>޸ĵ绰<C4B5><E7BBB0><EFBFBD><EFBFBD>\n8:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n<><6E><EFBFBD><EFBFBD>:<3A>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>\n");
break;
case 4:
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µij<C2B5><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
scanf("%s",stu[j].chusheng);
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n1:<3A>޸<EFBFBD>ѧ<EFBFBD><D1A7>\n2:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n3:<3A>޸<EFBFBD><DEB8>Ա<EFBFBD>\n4:<3A>޸ij<DEB8><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n5:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n6:<3A>޸ĵ<DEB8>ַ\n7:<3A>޸ĵ绰<C4B5><E7BBB0><EFBFBD><EFBFBD>\n8:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n<><6E><EFBFBD><EFBFBD>:<3A>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>\n");
break;
case 5:
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD><C2B5><EFBFBD><EFBFBD><EFBFBD>\n");
scanf("%d",&stu[j].nianling);
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n1:<3A>޸<EFBFBD>ѧ<EFBFBD><D1A7>\n2:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n3:<3A>޸<EFBFBD><DEB8>Ա<EFBFBD>\n4:<3A>޸ij<DEB8><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n5:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n6:<3A>޸ĵ<DEB8>ַ\n7:<3A>޸ĵ绰<C4B5><E7BBB0><EFBFBD><EFBFBD>\n8:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n<><6E><EFBFBD><EFBFBD>:<3A>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>\n");
break;
case 6:
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µĵ<C2B5>ַ\n");
scanf("%s",stu[j].dizhi);
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n1:<3A>޸<EFBFBD>ѧ<EFBFBD><D1A7>\n2:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n3:<3A>޸<EFBFBD><DEB8>Ա<EFBFBD>\n4:<3A>޸ij<DEB8><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n5:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n6:<3A>޸ĵ<DEB8>ַ\n7:<3A>޸ĵ绰<C4B5><E7BBB0><EFBFBD><EFBFBD>\n8:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n<><6E><EFBFBD><EFBFBD>:<3A>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>\n");
break;
case 7:
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µĵ绰<C4B5><E7BBB0><EFBFBD><EFBFBD>\n");
scanf("%s",stu[j].dianhua);
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n1:<3A>޸<EFBFBD>ѧ<EFBFBD><D1A7>\n2:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n3:<3A>޸<EFBFBD><DEB8>Ա<EFBFBD>\n4:<3A>޸ij<DEB8><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n5:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n6:<3A>޸ĵ<DEB8>ַ\n7:<3A>޸ĵ绰<C4B5><E7BBB0><EFBFBD><EFBFBD>\n8:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n<><6E><EFBFBD><EFBFBD>:<3A>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>\n");
break;
case 8:
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD><C2B5><EFBFBD><EFBFBD><EFBFBD>\n");
scanf("%s",stu[j].email);
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n1:<3A>޸<EFBFBD>ѧ<EFBFBD><D1A7>\n2:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n3:<3A>޸<EFBFBD><DEB8>Ա<EFBFBD>\n4:<3A>޸ij<DEB8><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n5:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n6:<3A>޸ĵ<DEB8>ַ\n7:<3A>޸ĵ绰<C4B5><E7BBB0><EFBFBD><EFBFBD>\n8:<3A>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n<><6E><EFBFBD><EFBFBD>:<3A>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>\n");
break;
default:
chongxie(); //<2F><><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
system("cls");
return;
}
}
if(j==student) //˵<><CBB5><EFBFBD><EFBFBD><EFBFBD>޴<EFBFBD><DEB4><EFBFBD>
printf("<22><><EFBFBD>޴<EFBFBD><DEB4><EFBFBD>!\n");
printf("|-----------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>--------------|\n");
printf("|--------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>-------------|\n");
fflush(stdin);
g=getchar(); //<2F><><EFBFBD><EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
system("cls");
return;
}
void chaxun() {
printf("|---------<2D>ѽ<EFBFBD><D1BD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>----------|\n");
int a,j; //a=1<><31>ѧ<EFBFBD>Ų<EFBFBD>ѯ<EFBFBD><D1AF>a=2<><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>
char g;
char x[12]; //<2F><><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7>
char m[10]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
printf("<22><><EFBFBD><EFBFBD>1<EFBFBD><31>ѧ<EFBFBD>Ų<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ\n");
scanf("%d",&a);
fflush(stdin); //fflush(stdin);<3B><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>Ļس<C4BB><D8B3><EFBFBD>Ӱ<EFBFBD><EFBFBD><ECB5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if(a==1) {
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7>\n");
scanf("%s",x);
fflush(stdin); //fflush(stdin);<3B><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>Ļس<C4BB><D8B3><EFBFBD>Ӱ<EFBFBD><EFBFBD><ECB5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if(strlen(x)!=11) { //<2F><><EFBFBD><EFBFBD>11λֱ<CEBB><D6B1><EFBFBD>ж<EFBFBD>Ϊ<EFBFBD><CEAA>ʽ<EFBFBD><CABD><EFBFBD>󣬽<EFBFBD><F3A3ACBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
printf("<22><>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>!\n");
return;
}
for(j=0; j<student; j++)
if(strcmp(x,stu[j].xuehao)==0) {
printf("ѧ<><D1A7> <09><><EFBFBD><EFBFBD> <09>Ա<EFBFBD> <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <09><><EFBFBD><EFBFBD> <09><>ַ <09><EFBFBD><E7BBB0><EFBFBD><EFBFBD> E-mail<69><6C><EFBFBD><EFBFBD>\n"); //<2F>Ʊ<EFBFBD>
printf("%s\t%s\t\t%c\t%s\t\t%d\t%s\t%s\t%s\n",stu[j].xuehao,stu[j].ming,stu[j].xingbie,stu[j].chusheng,stu[j].nianling,stu[j].dizhi,stu[j].dianhua,stu[j].email);
break;
}
} else if(a==2) {
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
scanf("%s",m);
fflush(stdin); //fflush(stdin);<3B><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>Ļس<C4BB><D8B3><EFBFBD>Ӱ<EFBFBD><EFBFBD><ECB5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for(j=0; j<student; j++)
if(strcmp(m,stu[j].ming)==0) {
printf("ѧ<><D1A7> <09><><EFBFBD><EFBFBD> <09>Ա<EFBFBD> <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <09><><EFBFBD><EFBFBD> <09><>ַ <09><EFBFBD><E7BBB0><EFBFBD><EFBFBD> E-mail<69><6C><EFBFBD><EFBFBD>\n"); //<2F>Ʊ<EFBFBD>
printf("%s\t%s\t\t%c\t%s\t\t%d\t%s\t%s\t%s\n",stu[j].xuehao,stu[j].ming,stu[j].xingbie,stu[j].chusheng,stu[j].nianling,stu[j].dizhi,stu[j].dianhua,stu[j].email);
break;
}
}
if(j==student) //˵<><CBB5><EFBFBD><EFBFBD><E9B2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
printf("<22><><EFBFBD>޴<EFBFBD><DEB4><EFBFBD>!\n");
printf("|-----------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>--------------|\n");
printf("|--------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>-------------|\n");
g=getchar(); //<2F><><EFBFBD><EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
system("cls");
return;
}
void shanchu() {
printf("|---------<2D>ѽ<EFBFBD><D1BD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>----------|\n");
int j,t; //<2F><><EFBFBD><EFBFBD>forѭ<72><D1AD>
char g;
char a[12]; //<2F><><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7>
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫɾ<D2AA><C9BE>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7>\n");
scanf("%s",a);
fflush(stdin); //fflush(stdin);<3B><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>Ļس<C4BB><D8B3><EFBFBD>Ӱ<EFBFBD><EFBFBD><ECB5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if(strlen(a)!=11) { //<2F><><EFBFBD><EFBFBD>11λֱ<CEBB><D6B1><EFBFBD>ж<EFBFBD>Ϊ<EFBFBD><CEAA>ʽ<EFBFBD><CABD><EFBFBD>󣬽<EFBFBD><F3A3ACBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
printf("<22><>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>!\n");
return;
}
for(j=0; j<student; j++) //<2F><>ʼһ<CABC><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ
if(strcmp(a,stu[j].xuehao)==0) {
if(j!=student-1) {
for(t=j; t<student-1; t++) { //<2F>Ӻ<EFBFBD><D3BA><EFBFBD>ǰ<EFBFBD><C7B0>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD>ͬѧ<CDAC><D1A7>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
strcpy(stu[t].xuehao,stu[t+1].xuehao); //strcpy<70><79><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
strcpy(stu[t].ming,stu[t+1].ming);
stu[t].xingbie=stu[t+1].xingbie;
strcpy(stu[t].chusheng,stu[t+1].chusheng);
stu[t].nianling=stu[t+1].nianling;
strcpy(stu[t].dizhi,stu[t+1].dizhi);
strcpy(stu[t].dianhua,stu[t+1].dianhua);
strcpy(stu[t].email,stu[t+1].email);
}
student--; //ѧ<><D1A7><EFBFBD><EFBFBD>-1
printf("<22>ɹ<EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ\n");
}
else {
j--; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB> <20><>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD>Ƚ<EFBFBD><C8BD>
student--; //ѧ<><D1A7><EFBFBD><EFBFBD>-1
printf("<22>ɹ<EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ\n");
}
break;
}
if(j==student) //˵<><CBB5><EFBFBD><EFBFBD><EFBFBD>޴<EFBFBD><DEB4><EFBFBD>
printf("<22><><EFBFBD>޴<EFBFBD><DEB4><EFBFBD>!\n");
else
chongxie(); //<2F><><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
printf("|-----------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>--------------|\n");
printf("|--------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>-------------|\n");
g=getchar(); //<2F><><EFBFBD><EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
system("cls");
return;
}
void paixu() {
printf("|---------<2D>ѽ<EFBFBD><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>----------|\n");
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD>\n");
int j,t,z,y; //j,z,y<><79><EFBFBD><EFBFBD>forѭ<72><D1AD><EFBFBD><EFBFBD>t<EFBFBD><74><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
char jiaohuan[50],xing,g; //jiaohuan[50]<5D><><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>xing<6E><67><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD>Ա<EFBFBD>
for(j=0; j<student-1; j++)
for(z=j; z<student-1; z++) //<2F><>ѧ<EFBFBD><D1A7>Ϊ<EFBFBD><CEAA>׼<EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD>ô<EFBFBD><C3B4>ϵ<EFBFBD><CFB5>£<EFBFBD><C2A3><EFBFBD>С<EFBFBD><D0A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD>
if(strcmp(stu[j].xuehao,stu[z+1].xuehao)>0) {
strcpy(jiaohuan,stu[j].xuehao);
strcpy(stu[j].xuehao,stu[z+1].xuehao);
strcpy(stu[z+1].xuehao,jiaohuan);
strcpy(jiaohuan,stu[j].ming);
strcpy(stu[j].ming,stu[z+1].ming);
strcpy(stu[z+1].ming,jiaohuan);
xing=stu[j].xingbie;
stu[j].xingbie=stu[z+1].xingbie;
stu[z+1].xingbie=xing;
strcpy(jiaohuan,stu[j].chusheng);
strcpy(stu[j].chusheng,stu[z+1].chusheng);
strcpy(stu[z+1].chusheng,jiaohuan);
t=stu[j].nianling;
stu[j].nianling=stu[z+1].nianling;
stu[z+1].nianling=t;
strcpy(jiaohuan,stu[j].dizhi);
strcpy(stu[j].dizhi,stu[z+1].dizhi);
strcpy(stu[z+1].dizhi,jiaohuan);
strcpy(jiaohuan,stu[j].dianhua);
strcpy(stu[j].dianhua,stu[z+1].dianhua);
strcpy(stu[z+1].dianhua,jiaohuan);
strcpy(jiaohuan,stu[j].email);
strcpy(stu[j].email,stu[z+1].email);
strcpy(stu[z+1].email,jiaohuan);
}
chongxie();
printf("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
printf("|-----------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>--------------|\n");
printf("|--------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>-------------|\n");
g=getchar(); //<2F><><EFBFBD><EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
system("cls");
return;
}