#include<iostream.h>
typedef struct
{int id;
float math;
float physics;
float computer;
float english;
float politics;
float sport;
float history;
float geography;
} STUDENT_SCORE;
void score(STUDENT_SCORE*);
int main()
{STUDENT_SCORE student_score;
cout<<"输入学生的编号:"<<endl;
cin>>student_score.id;
student_score.math=90;
student_score. physics=80;
student_score. computer=70;
student_score.english=60;
student_score.politics=50;
student_score.sport=30;
student_score.geography=20;
score(&student_score);;
return 1;
}
void score(STUDENT_SCORE*p)
{
//输出学生的编号
cout<<"编号是:"<<p->id<<endl;
cout<<"数学是:"<<p->math<<endl;
cout<<"物理是:"<<p->physics<<endl;
cout<<"计算机是:"<<p->computer<<endl;
cout<<"英语是:"<<p->english<<endl;
cout<<"政治是:"<<p->politics<<endl;
cout<<"体育是:"<<p->sport<<endl;
cout<<"地理是:"<<p->geography<<endl;
}