#include <iostream>
#include<bits/stdc++.h>
#include<cstdlib>
using namespace std;
struct Student
{
char name[20];
int number;
int age;
char sex;
float score;
};
void print(Student *p[])
{
int i;
cout<<"姓名 学号 年龄 性别 分数"<<endl;
for(i=0;i<5;i++)
{
cout<<p[i]->name<<" "<<p[i]->number<<" "<<p[i]->age<<" "<<p[i]->sex<<" "<<p[i]->score<<endl;
}
cout<<endl;
}
void sort(Student *p[])
{
Student *temp;
int i,j,flag;
for(i=0;i<4;i++)
{
flag=0;
for(j=0;j<4-i;j++)
{
c++定义结构体对学生成绩排序
最新推荐文章于 2024-07-17 13:35:02 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)