c语言程序设计实验题目:输入一
#include
#include
#include
using namespace std;
struct student
{
string id;
int math;
int english;
int computer;
int total;
double ave;
};
const int MAX=10;
void sort(student a[],int n);
void printout(student a[],int n);
int main()
{
student s[MAX];
int i;
for(i=0;i>s[i]。 id>>s[i]。math>>s[i]。engl...全部
#include
#include
#include
using namespace std;
struct student
{
string id;
int math;
int english;
int computer;
int total;
double ave;
};
const int MAX=10;
void sort(student a[],int n);
void printout(student a[],int n);
int main()
{
student s[MAX];
int i;
for(i=0;i>s[i]。
id>>s[i]。math>>s[i]。english>>s[i]。computer;
}
cout<<"计算总分及平均成绩"< total=s[i]。math+s[i]。english+s[i]。computer;
s[i]。ave=s[i]。total/3。0;
}
sort(s,MAX);
cout<<"输出排序成绩"< total;
for(j=i+1;j id< ave<收起