//快点采纳!!!
#include<iostream>
#define N 5
using namespace std;
struct student
{
int score;
string number;
string name;
} stu[N];
void Output()
{
cout<<"以下为所有学生信息:"<<endl;
for(int i=0; i<N; i++)
cout<<stu[i].number<<" "<<stu[i].name<<" "<<stu[i].score<<endl;
}
void Putbest()
{
int best=0,x;
for(int i=0; i<N; i++)
if(stu[i].score>best)
{
x=i;
best=stu[i].score;
}
cout<<"成绩最好的学生的信息为:";
cout<<stu[x].number<<" "<<stu[x].name<<" "<<stu[x].score<<endl;
}
int main()
{
cout<<"请输入这"<<N<<"名学生的信息:"<<endl;
for(int i=0; i<N; i++)
cin>>stu[i].number>>stu[i].name>>stu[i].score;
Output();
Putbest();
}