|
|
|
|
# include<windows.h>
|
|
|
|
|
#include<stdlib.h>
|
|
|
|
|
#include<string.h>
|
|
|
|
|
#include<stdio.h>
|
|
|
|
|
#define N 100
|
|
|
|
|
struct student
|
|
|
|
|
{
|
|
|
|
|
char no[9];
|
|
|
|
|
char name[25];
|
|
|
|
|
char sex[10];
|
|
|
|
|
int age;
|
|
|
|
|
char jiguan[25];
|
|
|
|
|
char xibie[25];
|
|
|
|
|
char zhuanye[25];
|
|
|
|
|
int ban;
|
|
|
|
|
}stu[N];
|
|
|
|
|
void menu()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
int choice,w1;
|
|
|
|
|
void add();void find();void shanchu();void change();void tongji();
|
|
|
|
|
void read();void input();
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
puts("\t******************************");
|
|
|
|
|
puts("\t* <20><>ӭʹ<D3AD><CAB9>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ *");
|
|
|
|
|
puts("\t* 1 ¼<><C2BC>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *");
|
|
|
|
|
puts("\t* 2<><32><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *");
|
|
|
|
|
puts("\t* 3ɾ<33><C9BE>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *");
|
|
|
|
|
puts("\t* 4<><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *");
|
|
|
|
|
puts("\t* 5<><35>ѧ<EFBFBD>Ż<EFBFBD>רҵ<D7A8><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*");
|
|
|
|
|
puts("\t* 6<>鿴<EFBFBD><E9BFB4><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *");
|
|
|
|
|
puts("\t 7<>˳<EFBFBD>ϵͳ *");
|
|
|
|
|
puts("\t***********************************");
|
|
|
|
|
printf("<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><EFBFBD><EFBFBD>:");
|
|
|
|
|
scanf("%d",&choice);
|
|
|
|
|
if(choice<1||choice>8)
|
|
|
|
|
{
|
|
|
|
|
w1=1;printf("<EFBFBD>˵<EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>\n");}
|
|
|
|
|
else
|
|
|
|
|
w1=0;
|
|
|
|
|
}while(w1==1);
|
|
|
|
|
switch(choice)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
add();
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
find();
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
shanchu();
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
change();
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
tongji();
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
read();
|
|
|
|
|
break;
|
|
|
|
|
case 7:
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
exit(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
int load()
|
|
|
|
|
{
|
|
|
|
|
FILE *fp;
|
|
|
|
|
int i;
|
|
|
|
|
if((fp=fopen("result.txt","a+"))==NULL)
|
|
|
|
|
{
|
|
|
|
|
printf("<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|
|
|
|
exit(0);
|
|
|
|
|
}
|
|
|
|
|
for(i=0;feof(fp);i++)
|
|
|
|
|
fread(&stu[i],sizeof(struct student),1,fp);
|
|
|
|
|
fclose(fp);
|
|
|
|
|
return(i-1);
|
|
|
|
|
}
|
|
|
|
|
//********<2A><><EFBFBD>溯<EFBFBD><E6BAAF>
|
|
|
|
|
void save(int n)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
FILE*fp;
|
|
|
|
|
if((fp=fopen("results.txt","a+"))=NULL)
|
|
|
|
|
{
|
|
|
|
|
printf("<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|
|
|
|
}
|
|
|
|
|
for(i=0;i<n;i++)
|
|
|
|
|
fwrite(&stu[i],sizeof(struct student),1,fp);
|
|
|
|
|
fclose(fp);
|
|
|
|
|
}
|
|
|
|
|
void read()
|
|
|
|
|
{
|
|
|
|
|
int n,m,k;
|
|
|
|
|
n=load();
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>˶<EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ");
|
|
|
|
|
scanf("%d",&k);
|
|
|
|
|
printf("ѧ<EFBFBD><EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<EFBFBD>Ա<EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\tϵ<EFBFBD><EFBFBD>\tרҵ\t<EFBFBD>༶\t");
|
|
|
|
|
for(m=0;m<k;m++)
|
|
|
|
|
{
|
|
|
|
|
printf("\n%s",stu[m].no);
|
|
|
|
|
printf("\t%s",stu[m].name);
|
|
|
|
|
printf("\t%s",stu[m].sex);
|
|
|
|
|
printf("\t%d",stu[m].age);
|
|
|
|
|
printf("\t%s",stu[m].jiguan);
|
|
|
|
|
printf("\t%s",stu[m].xibie);
|
|
|
|
|
printf("\t%s",stu[m].zhuanye);
|
|
|
|
|
printf("\t%d",stu[m].ban);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
int xz ,choice;//ѡ<>ػ<F1B7B5BB><D8BB><EFBFBD><EFBFBD>˳<EFBFBD>ϵͳ<CFB5>ı<EFBFBD><C4B1><EFBFBD>
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
printf("\n1-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> 2-<2D>˳<EFBFBD>ϵͳ\n");
|
|
|
|
|
scanf("%d",&choice);
|
|
|
|
|
if(choice<1||choice>2)
|
|
|
|
|
{xz=1;system("cls");printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
}
|
|
|
|
|
else xz=0;
|
|
|
|
|
}while(xz==1);
|
|
|
|
|
switch(choice)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
menu();
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
exit(0);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//*********¼<><C2BC>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
void add()
|
|
|
|
|
{
|
|
|
|
|
FILE *fp;
|
|
|
|
|
int i,m,n;
|
|
|
|
|
n=0;
|
|
|
|
|
if((fp=fopen("results.txt","wb"))=NULL)
|
|
|
|
|
{
|
|
|
|
|
printf("<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
exit(1);
|
|
|
|
|
}
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٸ<EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%d",&m);
|
|
|
|
|
for(i=0;i<m;i++)
|
|
|
|
|
{
|
|
|
|
|
printf("\nѧ<EFBFBD>ţ<EFBFBD>");
|
|
|
|
|
scanf("%s",stu[n+i].no);
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%s",stu[n+i].name);
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%s",stu[n+i].jiguan);
|
|
|
|
|
printf("ϵ<EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%s",stu[n+i].xibie);
|
|
|
|
|
printf("<EFBFBD>Ա<EFBFBD>");
|
|
|
|
|
scanf("%s",stu[n+i].sex);
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%d",&stu[n+i].age);
|
|
|
|
|
printf("רҵ");
|
|
|
|
|
scanf("%s",stu[n+i].zhuanye);
|
|
|
|
|
printf("<EFBFBD>༶");
|
|
|
|
|
scanf("%d",&stu[n+i].ban);
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|
|
|
|
}
|
|
|
|
|
save(m);
|
|
|
|
|
fclose(fp);
|
|
|
|
|
{
|
|
|
|
|
int xz,choice;
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
printf("\n-1<><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>2-<2D>˳<EFBFBD>ϵͳ\n");
|
|
|
|
|
scanf("%d",&choice);
|
|
|
|
|
if(choice<1||choice>2)
|
|
|
|
|
{xz=1;system("cls");
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");}
|
|
|
|
|
else xz=0;
|
|
|
|
|
}while(xz==1);
|
|
|
|
|
switch(choice)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
menu();break;
|
|
|
|
|
case 2:
|
|
|
|
|
exit(0);break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//****<2A><><EFBFBD>Һ<EFBFBD><D2BA><EFBFBD>******//
|
|
|
|
|
void find()
|
|
|
|
|
{
|
|
|
|
|
int menu();
|
|
|
|
|
int i,n;
|
|
|
|
|
char m[9];
|
|
|
|
|
n=load();
|
|
|
|
|
printf("\t\t\t <20><>ӭʹ<D3AD><CAB9>ѧ<EFBFBD>Ų<EFBFBD><C5B2>ҹ<EFBFBD><D2B9><EFBFBD>\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD>ţ<EFBFBD>");
|
|
|
|
|
scanf("%s",&m);
|
|
|
|
|
if(!strcmp(stu[i].no,m))
|
|
|
|
|
{
|
|
|
|
|
printf("ѧ<EFBFBD><EFBFBD>\t<EFBFBD>Ա<EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\tϵͳ\tרҵ\t<EFBFBD>༶\n");
|
|
|
|
|
printf("%s",stu[i].no);
|
|
|
|
|
printf("\t%s",stu[i].name);
|
|
|
|
|
printf("\t%s",stu[i].sex);
|
|
|
|
|
printf("\t%d",stu[i].age);
|
|
|
|
|
printf("\t%s",stu[i].jiguan);
|
|
|
|
|
printf("\t%s",stu[i].xibie);
|
|
|
|
|
printf("\t%s",stu[i].zhuanye);
|
|
|
|
|
printf("\t%d\n",stu[i].ban);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD>Ŵ<EFBFBD><EFBFBD><EFBFBD>");
|
|
|
|
|
{
|
|
|
|
|
int xz,choice;
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
printf("\n 1-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> 2-<2D>˳<EFBFBD>ϵͳ\n");
|
|
|
|
|
scanf("%d",&choice);
|
|
|
|
|
if(choice<1||choice>2)
|
|
|
|
|
{xz=1;system("cls");printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");}
|
|
|
|
|
else xz=0;
|
|
|
|
|
}while(xz==1);
|
|
|
|
|
switch(choice)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
menu();break;
|
|
|
|
|
case 2:
|
|
|
|
|
exit(0);break;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//<2F>ĺ<DEB8><C4BA><EFBFBD>
|
|
|
|
|
void change()
|
|
|
|
|
{
|
|
|
|
|
int n,i,j;
|
|
|
|
|
|
|
|
|
|
char m[9];
|
|
|
|
|
n=load();
|
|
|
|
|
printf("<EFBFBD><EFBFBD>ӭʹ<EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><EFBFBD><EFBFBD>\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%s",&m);
|
|
|
|
|
if(!strcmp(stu[i].no,m))
|
|
|
|
|
{
|
|
|
|
|
printf("<EFBFBD><EFBFBD>Ҫ<EFBFBD>ĵ<EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD>\n1<EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD> 2<><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3<><33><EFBFBD>Ա<EFBFBD> 4<><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 5<><35><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 6<><36>ϵ<EFBFBD><CFB5> 7<><37>רҵ 8<><38><EFBFBD>༶\n");
|
|
|
|
|
printf("<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǣ<EFBFBD>");
|
|
|
|
|
scanf("%d",&j);
|
|
|
|
|
switch(j)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD>ţ<EFBFBD>");
|
|
|
|
|
scanf("%s,stu[i].name");
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%s",stu[i].name);
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%s,stu[i].sex");
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䣻");
|
|
|
|
|
scanf("%d",&stu[i].age);
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%s",stu[i].jiguan);
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%s",stu[i].xibie);
|
|
|
|
|
break;
|
|
|
|
|
case 7:
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD>רҵ<EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%s",stu[i].zhuanye);
|
|
|
|
|
break;
|
|
|
|
|
case 8:
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD>İ༶<EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%d",&stu[i].ban);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
printf("ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
save(1);
|
|
|
|
|
{
|
|
|
|
|
int xz,choice;
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
printf("\n 1-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> 2-<2D>˳<EFBFBD>ϵͳ\n");
|
|
|
|
|
scanf("%d",&choice);
|
|
|
|
|
if(choice<1||choice>2)
|
|
|
|
|
{xz=1;system("cls");printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
}
|
|
|
|
|
else xz =0;
|
|
|
|
|
}while(xz==1);
|
|
|
|
|
switch(choice)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
menu();
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
exit(0);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//**********ͳ<>ƺ<EFBFBD><C6BA><EFBFBD>
|
|
|
|
|
void tongji_1()//<2F><>ѧ<EFBFBD><D1A7>ͳ<EFBFBD><CDB3>
|
|
|
|
|
{
|
|
|
|
|
int n,i,sum=0;
|
|
|
|
|
char m[9];
|
|
|
|
|
n=load();
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫͳ<EFBFBD>Ƶ<EFBFBD>ѧ<EFBFBD>ţ<EFBFBD>");
|
|
|
|
|
scanf("%s",&m);
|
|
|
|
|
printf("ѧ<EFBFBD><EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<EFBFBD>Ա<EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\tϵ<EFBFBD><EFBFBD>\tרҵ\t<EFBFBD>༶\n");
|
|
|
|
|
for(i=0;!strcmp(m,stu[i].zhuanye);i++)
|
|
|
|
|
{
|
|
|
|
|
printf("%s",stu[i].no);
|
|
|
|
|
printf("\t%s",stu[i].name);
|
|
|
|
|
printf("\t%s",stu[i].sex);
|
|
|
|
|
printf("\t%d",stu[i].age);
|
|
|
|
|
printf("\t%s",stu[i].jiguan);
|
|
|
|
|
printf("\t%s",stu[i].xibie);
|
|
|
|
|
printf("\t%s",stu[i].zhuanye);
|
|
|
|
|
printf("\t%d\n",stu[i].ban);
|
|
|
|
|
sum++;
|
|
|
|
|
printf("%sѧ<73>ŵ<EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%d<><64>\n",m,sum);}
|
|
|
|
|
}
|
|
|
|
|
void tongji_2()//<2F><>רҵͳ<D2B5><CDB3>
|
|
|
|
|
{
|
|
|
|
|
int n,i,sum=0;
|
|
|
|
|
char m[25];
|
|
|
|
|
n=load();
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫͳ<EFBFBD>Ƶ<EFBFBD>רҵ<EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%s",&m);
|
|
|
|
|
printf("ѧ<EFBFBD><EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<EFBFBD>Ա<EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\tרҵ\t<EFBFBD>༶\n");
|
|
|
|
|
for(i=0;!strcmp(m,stu[i].zhuanye);i++)
|
|
|
|
|
{
|
|
|
|
|
printf("%s",stu[i].no);
|
|
|
|
|
printf("\t%s",stu[i].name);
|
|
|
|
|
printf("\t%s",stu[i].sex);
|
|
|
|
|
printf("\t%d",stu[i].age);
|
|
|
|
|
printf("\t%s",stu[i].jiguan);
|
|
|
|
|
printf("\t%s",stu[i].xibie);
|
|
|
|
|
printf("\t%s",stu[i].zhuanye);
|
|
|
|
|
printf("\t%d\n",stu[i].ban);
|
|
|
|
|
sum++;
|
|
|
|
|
printf("%sרҵ<D7A8><D2B5>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%d<><64>\n",m,sum);}
|
|
|
|
|
}
|
|
|
|
|
void tongji()
|
|
|
|
|
{
|
|
|
|
|
int n,m;
|
|
|
|
|
n=load();
|
|
|
|
|
printf("<EFBFBD><EFBFBD>ӭʹ<EFBFBD><EFBFBD>ͳ<EFBFBD>ƹ<EFBFBD><EFBFBD><EFBFBD>\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>Ƶ<EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD>ǣ<EFBFBD>1) ѧ<><D1A7>\t 2)רҵ\n");
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><EFBFBD>ܣ<EFBFBD>");
|
|
|
|
|
scanf("%d",&m);
|
|
|
|
|
switch(m)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
tongji_1();
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
tongji_2();
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
printf("ѡ<EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><EFBFBD>ܴ<EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
int getch();
|
|
|
|
|
tongji();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
int xz,choice;
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
printf("\n 1-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> 2-<2D>˳<EFBFBD>ϵͳ\n");
|
|
|
|
|
scanf("%d",&choice);
|
|
|
|
|
if(choice<1||choice>2)
|
|
|
|
|
{xz=1,system("cls");printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
}
|
|
|
|
|
else xz =0;
|
|
|
|
|
}while(xz==1);
|
|
|
|
|
switch(choice)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
menu();
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
exit(0);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//**************ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
void shanchu()
|
|
|
|
|
{
|
|
|
|
|
int n,j,i,k;
|
|
|
|
|
char m[9];
|
|
|
|
|
n=load();
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٸ<EFBFBD><EFBFBD><EFBFBD>Ϣ");
|
|
|
|
|
scanf("%d",&k);
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%s",&m);
|
|
|
|
|
for(i=0;i<k;i++)
|
|
|
|
|
{
|
|
|
|
|
if(!strcmp(stu[i].no,m))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
strcpy(stu[j].no,stu[j+1].no);
|
|
|
|
|
strcpy(stu[j].name,stu[j+1].name);
|
|
|
|
|
stu[j].age=stu[j+1].age;
|
|
|
|
|
strcpy(stu[j].jiguan,stu[j+1].jiguan);
|
|
|
|
|
strcpy(stu[j].xibie,stu[j+1].xibie);
|
|
|
|
|
strcpy(stu[j].zhuanye,stu[j+1].zhuanye);
|
|
|
|
|
strcpy(stu[j].sex,stu[j+1].sex);
|
|
|
|
|
stu[j].ban=stu[j+1].ban;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
printf("û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD>");
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
int xz,choice;
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
printf("\n 1-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> 2-<2D>˳<EFBFBD>ϵͳ\n");
|
|
|
|
|
scanf("%d",&choice);
|
|
|
|
|
if(choice<1||choice>2)
|
|
|
|
|
{xz=1,system("cls");printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
}
|
|
|
|
|
else xz =0;
|
|
|
|
|
}while(xz==1);
|
|
|
|
|
switch(choice)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
menu();
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
exit(0);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
menu();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|