以下是在 C 语言中如何使用结构体输入 5 个学生的姓名和成绩,并按照成绩从高到低输出的代码示例:
#include <stdio.h>
#include <string.h>
struct student {
char name[20];
int score;
};
void sort(struct student s[], int n) {
int i, j;
struct
以下是在 C 语言中如何使用结构体输入 5 个学生的姓名和成绩,并按照成绩从高到低输出的代码示例:
#include <stdio.h>
#include <string.h>
struct student {
char name[20];
int score;
};
void sort(struct student s[], int n) {
int i, j;
struct