请问这个是咋回事
```c++
#include<iostream>
#include<string.h>
#include<iomanip>
using namespace std;
struct student{
char number[3];
char name[6];
int age;
};
int main(){
int n;
cin>>n;
student student[n];
for(int i=0;i<n;i++){
cin>>student[i].number>>student[i].name>>student[i].age;
}
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
if(strcmp(student[i].name,student[j].name)>0){
swap(student[i].number,student[j].number);
swap(student[i].name,student[j].name);
swap(student[i].age,student[j].age);
}
}
}
for(int i=0;i<n;i++){
cout<<setw(3)<<student[i].number<<setw(6)<<student[i].name<<setw(3)<<student[i].age;
cout<<endl;}
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
if(student[i].age>student[j].age){
swap(student[i].number,student[j].number);
swap(student[i].name,student[j].name);
swap(student[i].age,student[j].age);
}
}
}
for(int i=0;i<n;i++){
cout<<setw(3)<<student[i].number<<setw(6)<<student[i].name<<setw(3)<<student[i].age;
cout<<endl;}
}
![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/013850585276192.png "#left")