/*
============================================================================
Name : C12.c
Author :
Version :
Copyright : Your copyright notice
Description : Hello World in C, Ansi-style
============================================================================
*/
#include <stdio.h>
#include <stdlib.h>
struct Student {
int stuid;
char name[30];
float score;
};
int main(void) {
//初始化结构体
struct Student stu[5] =
{ { 10101, "aaa", 37 }, { 10101, "bb", 67 },
{ 10103,
============================================================================
Name : C12.c
Author :
Version :
Copyright : Your copyright notice
Description : Hello World in C, Ansi-style
============================================================================
*/
#include <stdio.h>
#include <stdlib.h>
struct Student {
int stuid;
char name[30];
float score;
};
int main(void) {
//初始化结构体
struct Student stu[5] =
{ { 10101, "aaa", 37 }, { 10101, "bb", 67 },
{ 10103,

这是一个使用C语言编写的程序,定义了一个结构体`Student`来存储学生的学号、姓名和成绩,并通过冒泡排序算法将学生信息按照成绩从高到低进行排序。最后,程序会输出排序后的所有学生信息。
3万+

被折叠的 条评论
为什么被折叠?



