#include #define ST_NUM 2 //学生总数,可随需要修改 double average[6];//全局变量定义各科平均分,方便后续使用 typedef struct { int nu; //序号 int num; //学号 char name[9]; //姓名 float mark; float match; //数学 float english; float c_language; float pe; float history; float software; float sum; float average; }student; student ST[ST_NUM]={0}; int input() { int i,t; printf ("请输入%d个学生的信息:\n",ST_NUM); for (i=0;i=60) ST[i].mark+=5; if(ST[i].english>=60) ST[i].mark+=3; if(ST[i].c_language>=60) ST[i].mark+=3.5; if(ST[i].pe>=60) ST[i].mark+=2; if(ST[i].history>=60) ST[i].mark+=2; if(ST[i].software>=60) ST[i].mark+=2; } //计算各科平均分 for(i=0;iST[j+1].mark) { temp=ST[j]; ST[j]=ST[j+1]; ST[j+1]=temp; } } } } } } void output() { int i; printf("序号\t学号\t姓名\t"); printf("获得学分\t高等数学\t大学英语\tc语言\t大学体育\t近代史\t软件技术导论\t总分\t\t平均分\n"); for (i=0;i