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.
|
|
|
|
void xuanke_information()//ͳ<><CDB3>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
int mai_n();
|
|
|
|
|
int total=0;
|
|
|
|
|
int a;
|
|
|
|
|
FILE *fp;
|
|
|
|
|
struct student s;
|
|
|
|
|
if((fp=fopen("student.txt","r"))==NULL)//<2F>ļ<EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
printf("\nCannot open student!\n");
|
|
|
|
|
}
|
|
|
|
|
printf(" ѧ<><D1A7> <20>γ̱<CEB3><CCB1><EFBFBD> <20>γ<EFBFBD><CEB3><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
for(;!feof(fp);)
|
|
|
|
|
{fscanf(fp,"%d%d%s\n",&s.snum,&s.cnum,&s.cname);
|
|
|
|
|
total++;
|
|
|
|
|
printf("%7d%9d%13s\n",s.snum,s.cnum,s.cname);
|
|
|
|
|
}
|
|
|
|
|
printf("\n ѡ<><D1A1>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>%d <20><>",total);
|
|
|
|
|
fclose(fp);
|
|
|
|
|
printf("\n1-<2D><><EFBFBD>ز˵<D8B2><CBB5><EFBFBD>2-<2D>˳<EFBFBD>ϵͳ\n");
|
|
|
|
|
scanf("%d",&a);system("cls");//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
if(a==1)
|
|
|
|
|
mai_n();
|
|
|
|
|
else
|
|
|
|
|
exit(0);
|
|
|
|
|
}
|