根据结构体数组中某一数据项对结构体数组排序

/*
*copyright(c) 2018,HH
*All rights reserved.
*作 者:HH
*完成日期:2018年8月17日
*版本号:v1.0
*
*问题描述:输入结构体数组,并根据结构体中的某一数据项对整个结构体数组进行排序
*输入描述:;
*程序输出:
*/


#include
#include

struct student
{
    int num;
    char name[20];
    int cpp;
    int math;
    int english;
    int grade;
    double average;
};
struct student per[6];
struct student test;

int main()
{
    int n,m;
    printf("请输入需要统计信息的学生个数:\n");
    scanf("%d",&m);
    printf("请依次输入该%d名学生的信息\n",m);
    for(n=0;n

根据结构体数组中某一数据项对结构体数组排序_第1张图片

你可能感兴趣的:(根据结构体数组中某一数据项对结构体数组排序)