|
|
|
|
#include"stdio.h"
|
|
|
|
|
#include"string.h"
|
|
|
|
|
#define N 100
|
|
|
|
|
#define NULL 0
|
|
|
|
|
int n,m=0;//nΪ<6E><CEAA>¼ѧ<C2BC><D1A7><EFBFBD>ĸ<EFBFBD><C4B8><EFBFBD><EFBFBD><EFBFBD>mΪͳ<CEAA>ƺ<EFBFBD><C6BA><EFBFBD>1<EFBFBD>м<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĸ<EFBFBD><C4B8><EFBFBD>
|
|
|
|
|
struct kuangke
|
|
|
|
|
{//<2F>йؿ<D0B9><D8BF><EFBFBD>ͳ<EFBFBD>ƺ<EFBFBD><C6BA><EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>¼
|
|
|
|
|
char name[40];
|
|
|
|
|
int kuangke_num;
|
|
|
|
|
}kuangke[N];
|
|
|
|
|
struct kuangke2
|
|
|
|
|
{//<2F>йؿ<D0B9><D8BF><EFBFBD>ͳ<EFBFBD>ƺ<EFBFBD><C6BA><EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>¼
|
|
|
|
|
char name[40];
|
|
|
|
|
int num;
|
|
|
|
|
}kuangke2[N];
|
|
|
|
|
struct kuangke temp;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
|
|
|
|
struct kuangke2 temp2;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
|
|
|
|
struct Student
|
|
|
|
|
{//
|
|
|
|
|
int num;
|
|
|
|
|
char name[40];
|
|
|
|
|
char lesson_name[40];
|
|
|
|
|
char lesson_time[40];
|
|
|
|
|
float time;
|
|
|
|
|
int chidao_num;
|
|
|
|
|
int zaotui_num;
|
|
|
|
|
int qingjia_num;
|
|
|
|
|
int kuangke_num;
|
|
|
|
|
}stu[N];
|
|
|
|
|
void creat(void)
|
|
|
|
|
{//<2F><><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7>ȱ<EFBFBD>μ<EFBFBD>¼
|
|
|
|
|
int i;
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
scanf("%d",&n);
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȱ<EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("ѧ<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>γ<EFBFBD><CEB3><EFBFBD><EFBFBD><EFBFBD> <20>Ͽ<EFBFBD>ʱ<EFBFBD><CAB1> ȱ<><C8B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٵ<EFBFBD><D9B5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>˴<EFBFBD><CBB4><EFBFBD> <20><><EFBFBD>ٴ<EFBFBD><D9B4><EFBFBD> <20><><EFBFBD>δ<EFBFBD><CEB4><EFBFBD> \n");
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD>磺\n08 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> C<><43><EFBFBD>Կγ<D4BF><CEB3><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD> 6.10 \t1 \t0 \t0 \t0\n\n");
|
|
|
|
|
for(i=0;i<n;i++)
|
|
|
|
|
{
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%dλͬѧ<CDAC><D1A7>Ϣ<EFBFBD><CFA2>\n",i+1);
|
|
|
|
|
scanf("%d%s%s%s%f%d%d%d%d",&stu[i].num,stu[i].name,stu[i].lesson_name,stu[i].lesson_time,&stu[i].time,&stu[i].chidao_num,&stu[i].zaotui_num,&stu[i].qingjia_num,&stu[i].kuangke_num);
|
|
|
|
|
printf("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
printf("<EFBFBD><EFBFBD>%dλͬѧ<CDAC><D1A7>ϢΪ<CFA2><CEAA>\n\n",i+1);
|
|
|
|
|
printf("\tѧ<EFBFBD><EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<EFBFBD>γ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("\t%d\t%s\t%s\n\n",stu[i].num,stu[i].name,stu[i].lesson_name);
|
|
|
|
|
printf("\t<EFBFBD>Ͽ<EFBFBD>ʱ<EFBFBD><EFBFBD>\tȱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("\t%s\t%0.2f\n\n",stu[i].lesson_time,stu[i].time);
|
|
|
|
|
printf("\t<EFBFBD>ٵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>˴<EFBFBD><CBB4><EFBFBD> <20><><EFBFBD>ٴ<EFBFBD><D9B4><EFBFBD> <20><><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>\n");
|
|
|
|
|
printf("\t%d\t\t%d\t%d\t\t%d\n\n",stu[i].chidao_num,stu[i].zaotui_num,stu[i].qingjia_num,stu[i].kuangke_num);
|
|
|
|
|
printf("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
void xiugai(void)
|
|
|
|
|
{//<2F><EFBFBD>ѧ<EFBFBD><D1A7>ȱ<EFBFBD>μ<EFBFBD>¼
|
|
|
|
|
int i,k,flag=0;
|
|
|
|
|
int num;
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD>\n");
|
|
|
|
|
scanf("%d",&num);
|
|
|
|
|
for(i=0;i<n;i++)
|
|
|
|
|
{//<2F><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>з<EFBFBD><D0B7>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>ݣ<EFBFBD>
|
|
|
|
|
if(num==stu[i].num)
|
|
|
|
|
{
|
|
|
|
|
printf("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
printf("%d<><64>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϢΪ<CFA2><CEAA>\n\n",num);
|
|
|
|
|
printf("\tѧ<EFBFBD><EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<EFBFBD>γ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("\t%d\t%s\t%s\n\n",stu[i].num,stu[i].name,stu[i].lesson_name);
|
|
|
|
|
printf("\t<EFBFBD>Ͽ<EFBFBD>ʱ<EFBFBD><EFBFBD>\tȱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("\t%s\t%0.2f\n\n",stu[i].lesson_time,stu[i].time);
|
|
|
|
|
printf("\t<EFBFBD>ٵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>˴<EFBFBD><CBB4><EFBFBD> <20><><EFBFBD>ٴ<EFBFBD><D9B4><EFBFBD> <20><><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>\n");
|
|
|
|
|
printf("\t%d\t\t%d\t%d\t\t%d\n",stu[i].chidao_num,stu[i].zaotui_num,stu[i].qingjia_num,stu[i].kuangke_num);
|
|
|
|
|
printf("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
for(;k!=9;)
|
|
|
|
|
{//<2F><EFBFBD><DEB8><EFBFBD>Ϣ<EFBFBD>˵<EFBFBD>
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>ĵ<EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
printf("\t1.ѧ<><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t2.<2E>γ<EFBFBD><CEB3><EFBFBD><EFBFBD><EFBFBD>\t3.<2E>Ͽ<EFBFBD>ʱ<EFBFBD><CAB1>\n\n\t4.ȱ<><C8B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t5.<2E>ٵ<EFBFBD><D9B5><EFBFBD><EFBFBD><EFBFBD>\t6.<2E><><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>\n\n\t7.<2E><><EFBFBD>ٴ<EFBFBD><D9B4><EFBFBD>\t8.<2E><><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>\t9.<2E>˳<EFBFBD>\n");
|
|
|
|
|
scanf("%d",&k);
|
|
|
|
|
if(i<0||i>=50)
|
|
|
|
|
break;
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>");
|
|
|
|
|
switch(k)
|
|
|
|
|
{
|
|
|
|
|
case 1:scanf("%s",stu[i].name);break;
|
|
|
|
|
case 2:scanf("%s",stu[i].lesson_name);break;
|
|
|
|
|
case 3:scanf("%s",stu[i].lesson_time);break;
|
|
|
|
|
case 4:scanf("%f",&stu[i].time);break;
|
|
|
|
|
case 5:scanf("%d",&stu[i].chidao_num);break;
|
|
|
|
|
case 6:scanf("%d",&stu[i].zaotui_num);break;
|
|
|
|
|
case 7:scanf("%d",&stu[i].qingjia_num);break;
|
|
|
|
|
case 8:scanf("%d",&stu[i].kuangke_num);break;
|
|
|
|
|
case 9:break;
|
|
|
|
|
default:printf("<EFBFBD>ò˵<EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
}
|
|
|
|
|
printf("\n<EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϢΪ<EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
printf("%d<><64>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϢΪ<CFA2><CEAA>\n\n",num);
|
|
|
|
|
printf("\tѧ<EFBFBD><EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<EFBFBD>γ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("\t%d\t%s\t%s\n\n",stu[i].num,stu[i].name,stu[i].lesson_name);
|
|
|
|
|
printf("\t<EFBFBD>Ͽ<EFBFBD>ʱ<EFBFBD><EFBFBD>\tȱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("\t%s\t%0.2f\n\n",stu[i].lesson_time,stu[i].time);
|
|
|
|
|
printf("\t<EFBFBD>ٵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>˴<EFBFBD><CBB4><EFBFBD> <20><><EFBFBD>ٴ<EFBFBD><D9B4><EFBFBD> <20><><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>\n");
|
|
|
|
|
printf("\t%d\t\t%d\t%d\t\t%d\n",stu[i].chidao_num,stu[i].zaotui_num,stu[i].qingjia_num,stu[i].kuangke_num);
|
|
|
|
|
printf("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else//δ<><CEB4><EFBFBD><EFBFBD><E2B5BD>Ϣʱ<CFA2><CAB1>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>
|
|
|
|
|
flag++;
|
|
|
|
|
if(flag==n)
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void intfac(void)
|
|
|
|
|
{//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD>ѯ
|
|
|
|
|
int num,i,flag=0;
|
|
|
|
|
scanf("%d",&num);
|
|
|
|
|
for(i=0;i<n;i++)
|
|
|
|
|
{//<2F><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>з<EFBFBD><D0B7>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if(num==stu[i].num)
|
|
|
|
|
{
|
|
|
|
|
printf("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
printf("%d<><64>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϢΪ<CFA2><CEAA>\n\n",num);
|
|
|
|
|
printf("\tѧ<EFBFBD><EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<EFBFBD>γ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("\t%d\t%s\t%s\n\n",stu[i].num,stu[i].name,stu[i].lesson_name);
|
|
|
|
|
printf("\t<EFBFBD>Ͽ<EFBFBD>ʱ<EFBFBD><EFBFBD>\tȱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("\t%s\t%0.2f\n\n",stu[i].lesson_time,stu[i].time);
|
|
|
|
|
printf("\t<EFBFBD>ٵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>˴<EFBFBD><CBB4><EFBFBD> <20><><EFBFBD>ٴ<EFBFBD><D9B4><EFBFBD> <20><><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>\n");
|
|
|
|
|
printf("\t%d\t\t%d\t%d\t\t%d\n",stu[i].chidao_num,stu[i].zaotui_num,stu[i].qingjia_num,stu[i].kuangke_num);
|
|
|
|
|
printf("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
flag++;
|
|
|
|
|
}
|
|
|
|
|
if(flag==n)
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
}
|
|
|
|
|
void stringfac1(void)
|
|
|
|
|
{//<2F>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD>ѯ
|
|
|
|
|
int i,flag=0;
|
|
|
|
|
char string[40];
|
|
|
|
|
scanf("%s",string);
|
|
|
|
|
for(i=0;i<n;i++)
|
|
|
|
|
{//<2F><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>з<EFBFBD><D0B7>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if(strcmp(string,stu[i].name)==0)//<2F>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>Ƚ<EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
printf("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
printf("%d<><64>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϢΪ<CFA2><CEAA>\n\n",stu[i].num);
|
|
|
|
|
printf("\tѧ<EFBFBD><EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<EFBFBD>γ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("\t%d\t%s\t%s\n\n",stu[i].num,stu[i].name,stu[i].lesson_name);
|
|
|
|
|
printf("\t<EFBFBD>Ͽ<EFBFBD>ʱ<EFBFBD><EFBFBD>\tȱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("\t%s\t%0.2f\n\n",stu[i].lesson_time,stu[i].time);
|
|
|
|
|
printf("\t<EFBFBD>ٵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>˴<EFBFBD><CBB4><EFBFBD> <20><><EFBFBD>ٴ<EFBFBD><D9B4><EFBFBD> <20><><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>\n");
|
|
|
|
|
printf("\t%d\t\t%d\t%d\t\t%d\n",stu[i].chidao_num,stu[i].zaotui_num,stu[i].qingjia_num,stu[i].kuangke_num);
|
|
|
|
|
printf("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
flag++;
|
|
|
|
|
}
|
|
|
|
|
if(flag==n)
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
}
|
|
|
|
|
void stringfac2(void)
|
|
|
|
|
{//<2F>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD>ѯ
|
|
|
|
|
int i,flag=0;
|
|
|
|
|
char string[40];
|
|
|
|
|
scanf("%s",string);
|
|
|
|
|
for(i=0;i<n;i++)
|
|
|
|
|
{//<2F><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>з<EFBFBD><D0B7>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if(strcmp(string,stu[i].lesson_name)==0)
|
|
|
|
|
{
|
|
|
|
|
printf("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
printf("%d<><64>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϢΪ<CFA2><CEAA>\n",stu[i].num);
|
|
|
|
|
printf("\tѧ<EFBFBD><EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<EFBFBD>γ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("\t%d\t%s\t%s\n\n",stu[i].num,stu[i].name,stu[i].lesson_name);
|
|
|
|
|
printf("\t<EFBFBD>Ͽ<EFBFBD>ʱ<EFBFBD><EFBFBD>\tȱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("\t%s\t%0.2f\n\n",stu[i].lesson_time,stu[i].time);
|
|
|
|
|
printf("\t<EFBFBD>ٵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>˴<EFBFBD><CBB4><EFBFBD> <20><><EFBFBD>ٴ<EFBFBD><D9B4><EFBFBD> <20><><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>\n");
|
|
|
|
|
printf("\t%d\t\t%d\t%d\t\t%d\n",stu[i].chidao_num,stu[i].zaotui_num,stu[i].qingjia_num,stu[i].kuangke_num);
|
|
|
|
|
printf("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
flag++;
|
|
|
|
|
}
|
|
|
|
|
if(flag==n)
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
}
|
|
|
|
|
void chaxun(void)
|
|
|
|
|
{//ȱ<><C8B1><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѯ
|
|
|
|
|
int k;
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
printf("\n*******************************************************************\n");
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD>Ŀ\n\n");
|
|
|
|
|
printf("\t1.<2E><>ѧ<EFBFBD>Ų<EFBFBD>ѯ\t2.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ\n\n\t3.<2E><><EFBFBD>γ<EFBFBD><CEB3><EFBFBD><EFBFBD><EFBFBD>ѯ\t4.<2E>˳<EFBFBD><CBB3><EFBFBD>ѯ<EFBFBD>˵<EFBFBD>\n\n");
|
|
|
|
|
printf("\n*******************************************************************\n");
|
|
|
|
|
scanf("%d",&k);
|
|
|
|
|
switch(k)
|
|
|
|
|
{
|
|
|
|
|
case 1:printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD>ѧ<EFBFBD>ţ<EFBFBD>");intfac();break; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD>ѯ<EFBFBD><D1AF>ѧ<EFBFBD>ţ<EFBFBD>
|
|
|
|
|
case 2:printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");stringfac1();break; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>ѯ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
case 3:printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>γ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>");stringfac2();break; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><32>ѯ <20><><EFBFBD>γ<EFBFBD><CEB3><EFBFBD><EFBFBD><EFBFBD> <20>ַ<EFBFBD><D6B7><EFBFBD> <20><>
|
|
|
|
|
case 4:break;
|
|
|
|
|
default:printf("<EFBFBD>˲˵<EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
}
|
|
|
|
|
}while(k!=4);
|
|
|
|
|
}
|
|
|
|
|
void tongji1printf(void)
|
|
|
|
|
{
|
|
|
|
|
int i,j;
|
|
|
|
|
printf("\nͳ<EFBFBD>ƺ<EFBFBD><EFBFBD>Ľ<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
printf("\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
printf("\tȱ<EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
for(i=0;i<=m;i++)
|
|
|
|
|
for(j=i+1;j<=m+1;j++) //ͳ<><CDB3>1 ѧ<><D1A7><EFBFBD>Ŀ<EFBFBD><C4BF>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ζ<EFBFBD>---><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
if(kuangke[i].kuangke_num<kuangke[j].kuangke_num)
|
|
|
|
|
{
|
|
|
|
|
temp=kuangke[i];
|
|
|
|
|
kuangke[i]=kuangke[j];
|
|
|
|
|
kuangke[j]=temp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for(i=0;i<=m;i++)
|
|
|
|
|
printf("\t%s\t\t%d\n",kuangke[i].name,kuangke[i].kuangke_num);
|
|
|
|
|
printf("\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
}
|
|
|
|
|
void tongji2printf(void) //ͳ<><CDB3>2
|
|
|
|
|
{
|
|
|
|
|
int i,k,j;
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>γ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:\n");
|
|
|
|
|
scanf("%d",&k);
|
|
|
|
|
for(i=0;i<k;i++)
|
|
|
|
|
{
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%d<>ſγ̵<CEB3><CCB5><EFBFBD><EFBFBD>ƣ<EFBFBD>\n",i+1);
|
|
|
|
|
scanf("%s",kuangke2[i].name);
|
|
|
|
|
kuangke2[i].num=0;
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD>%d<>ſγ<C5BF><CEB3><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>%s\n",i+1,kuangke2[i].name); ///<2F><><EFBFBD>ĿεĿ<CEB5><C4BF><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
for(j=0;j<k;j++) ///kΪ<6B>γ<EFBFBD><CEB3><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
{//ͳ<>Ʒ<EFBFBD><C6B7>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>ĸ<EFBFBD><C4B8><EFBFBD>
|
|
|
|
|
for(i=0;i<=m;i++) // mΪ<6D><CEAA><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD> <20><>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ <20>Ѿ<EFBFBD><D1BE><EFBFBD> m=k<><6B>
|
|
|
|
|
{
|
|
|
|
|
if(strcmp(kuangke2[j].name,kuangke[i].name)==0) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀγ<C4BF><CEB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD>εĿγ<C4BF>
|
|
|
|
|
{
|
|
|
|
|
kuangke2[j].num=kuangke2[j].num+kuangke[i].kuangke_num;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for(i=0;i<k;i++)//<2F><><EFBFBD>Ӵ<EFBFBD><D3B4><EFBFBD>С<EFBFBD><D0A1><EFBFBD><EFBFBD>
|
|
|
|
|
for(j=i+1;j<k+1;j++)
|
|
|
|
|
{
|
|
|
|
|
if(kuangke2[i].num<kuangke2[j].num)
|
|
|
|
|
{
|
|
|
|
|
temp2=kuangke2[i];
|
|
|
|
|
kuangke2[i]=kuangke2[j];
|
|
|
|
|
kuangke2[j]=temp2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
printf("\nͳ<EFBFBD>ƺ<EFBFBD><EFBFBD>Ľ<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
printf("\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
for(j=0;j<k;j++)
|
|
|
|
|
{
|
|
|
|
|
printf("\t<EFBFBD>γ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD>\n\n");
|
|
|
|
|
printf("\t%s\t\t%d\n",kuangke2[j].name ,kuangke2[j].num);
|
|
|
|
|
}
|
|
|
|
|
printf("\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
|
|
|
|
}
|
|
|
|
|
void tongjifac1(void)
|
|
|
|
|
{//<2F><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
|
|
|
|
float time1,time2;
|
|
|
|
|
int i,flag=0,k;
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹʱ<EFBFBD><EFBFBD>\n");
|
|
|
|
|
scanf("%f%f",&time1,&time2);
|
|
|
|
|
for(i=0,k=0;i<n;i++)
|
|
|
|
|
{
|
|
|
|
|
if(stu[i].time>=time1&&stu[i].time<=time2)
|
|
|
|
|
{
|
|
|
|
|
if(stu[i].kuangke_num>0)
|
|
|
|
|
{
|
|
|
|
|
strcpy(kuangke[k].name,stu[i].name);
|
|
|
|
|
kuangke[k].kuangke_num=stu[i].kuangke_num;
|
|
|
|
|
m=k;
|
|
|
|
|
k++;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
flag++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(flag==n)
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
else
|
|
|
|
|
tongji1printf();
|
|
|
|
|
}
|
|
|
|
|
void tongjifac2(void)
|
|
|
|
|
{//<2F><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
|
|
|
|
float time1,time2;
|
|
|
|
|
int i,flag=0,k;
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹʱ<EFBFBD><EFBFBD>\n");
|
|
|
|
|
scanf("%f%f",&time1,&time2);
|
|
|
|
|
for(i=0,k=0;i<n;i++)
|
|
|
|
|
{
|
|
|
|
|
if(stu[i].time>=time1&&stu[i].time<=time2)
|
|
|
|
|
{
|
|
|
|
|
if(stu[i].kuangke_num>0)
|
|
|
|
|
{
|
|
|
|
|
strcpy(kuangke[k].name,stu[i].lesson_name);
|
|
|
|
|
kuangke[k].kuangke_num=stu[i].kuangke_num;
|
|
|
|
|
m=k;
|
|
|
|
|
k++;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
flag++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(flag==n)
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
else
|
|
|
|
|
tongji2printf();
|
|
|
|
|
}
|
|
|
|
|
void tongji(void)
|
|
|
|
|
{//ͳ<><CDB3>ȱ<EFBFBD><C8B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
int k;
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
printf("\n*******************************************************************\n");
|
|
|
|
|
printf("<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ\n\n");
|
|
|
|
|
printf("\n\t1.ͳ<><CDB3>ij<EFBFBD><C4B3>ʱ<EFBFBD><CAB1><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD>\n");
|
|
|
|
|
printf("\n\t2.ͳ<><CDB3>ij<EFBFBD><C4B3>ʱ<EFBFBD><CAB1><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD>εĿγ̼<CEB3><CCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˴Ρ<CBB4>\n");
|
|
|
|
|
printf("\n\t3.<2E>˳<EFBFBD>ͳ<EFBFBD>Ʋ˵<C6B2>\n");
|
|
|
|
|
printf("\n*******************************************************************\n");
|
|
|
|
|
scanf("%d",&k);
|
|
|
|
|
switch(k)
|
|
|
|
|
{
|
|
|
|
|
case 1:tongjifac1();break;
|
|
|
|
|
case 2:tongjifac2();break;
|
|
|
|
|
case 3:break;
|
|
|
|
|
default:printf("\n\n<EFBFBD>˲˵<EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>\n");
|
|
|
|
|
}
|
|
|
|
|
}while(k!=3);
|
|
|
|
|
}
|
|
|
|
|
int main(void)
|
|
|
|
|
{
|
|
|
|
|
struct Student *head;
|
|
|
|
|
int n;
|
|
|
|
|
printf("\t\t\t<EFBFBD><EFBFBD>ӭʹ<EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><EFBFBD><EFBFBD>ϵͳ\n\n");
|
|
|
|
|
printf("\t\t\t<EFBFBD><EFBFBD>ͳ<EFBFBD>ƺ<EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD>ĸ<EFBFBD><EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
printf("\t\t\t<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
printf("\t\t\tע<EFBFBD>⣻<EFBFBD><EFBFBD>ϵͳֻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
printf("\t\t\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD>д<EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
printf("********************************************************************************\n\n");
|
|
|
|
|
printf("\t\t\t1.<2E><><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7>ȱ<EFBFBD>μ<EFBFBD>¼\n\n");
|
|
|
|
|
printf("\t\t\t2.<2E><EFBFBD>ѧ<EFBFBD><D1A7>ȱ<EFBFBD>μ<EFBFBD>¼\n\n");
|
|
|
|
|
printf("\t\t\t3.<2E><>ѯѧ<D1AF><D1A7>ȱ<EFBFBD>μ<EFBFBD>¼\n\n");
|
|
|
|
|
printf("\t\t\t4.ͳ<><CDB3>ѧ<EFBFBD><D1A7>ȱ<EFBFBD>μ<EFBFBD>¼\n\n");
|
|
|
|
|
printf("\t\t\t5.<2E>˳<EFBFBD>ͳһ<CDB3><D2BB><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>ϵͳ\n\n");
|
|
|
|
|
printf("********************************************************************************\n");
|
|
|
|
|
scanf("%d",&n);
|
|
|
|
|
switch(n)
|
|
|
|
|
{
|
|
|
|
|
case 1:creat();break;
|
|
|
|
|
case 2:xiugai();break;
|
|
|
|
|
case 3:chaxun();break;
|
|
|
|
|
case 4:tongji();break;
|
|
|
|
|
case 5:break;
|
|
|
|
|
default:printf("<EFBFBD>ò˵<EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
}
|
|
|
|
|
}while(n!=5);
|
|
|
|
|
}
|
|
|
|
|
|