#include #include #include #define m_l 10 #define m_num 30 #define m_cs 6 typedef struct student { long num ; char name[m_l]; float score[m_cs]; float sum; float aver; }STU; int menu(void); void Readscore(STU stu[],int n,int m); void Aversumofeverystudent(STU stu[],int n,int m); void Aversumofeverycourse(STU stu[],int n,int m); void Sortbyscore(STU stu[],int n,int m,int (*compare)(float a,float b)); int Ascending(float a,float b); int Descending(float a,float b); void swapfloat(float *x,float *y); void swaplong(long *x,long *y); void swapchar(char x[],char y[]); void Assortbynum(STU stu[], int n, int m); void Sortbyname(STU stu[], int n, int m); void Searchbynum(STU stu[], int n, int m); void Searchbyname(STU stu[], int n, int m); void StatisticAnlysis(STU stu[], int n, int m); void Printscore(STU stu[], int n, int m); void Writetofile(STU stu[], int n, int m); void Readfromfile(STU stu[], int *n, int *m); int main() { char ch; int n=0,m=0; STU stu[m_num]; printf("请 输 入 学 生 人 数 (n<=%d):\n",m_num); scanf("%d",&n); printf("请 输 入 课 程 数 目 (m<=%d):\n",m_cs); scanf("%d",&m); while(1) { ch=menu(); switch(ch) { case 1: Readscore(stu,n,m); break; case 2: Aversumofeverystudent(stu ,n,m); break; case 3: Aversumofeverycourse(stu ,n,m); break; case 4: Sortbyscore(stu ,n,m,Descending); printf("\n 成 绩 降 序 排 序 \n"); Printscore( stu ,n, m); break; case 5: Sortbyscore(stu ,n,m,Ascending); printf("\n 成 绩 升 序 排 序 \n"); Printscore( stu ,n, m); break; case 6: Assortbynum( stu , n, m); printf("\n 学 号 升 序 排 序 \n"); Printscore( stu ,n, m); break; case 7: Sortbyname( stu , n, m); printf("\n 姓 名 字 典 升 序 排 序 \n"); Printscore( stu ,n, m); break; case 8: Searchbynum( st...