/*
动态存放学生信息的结构体数组,并按成绩排序输出
*/
#include <stdio.h>
#include <malloc.h>
//定义结构体:复杂数据结构
struct Student{
int age;
float score;
char name[100];
};
//定义函数:输入数据
void input(struct Student * info,int len){
int i;
for(i = 0;i < len;i++){
printf("请输入第%d个学生的信息:\n",i+1);
printf("age = ");
scanf
C语言初学七(动态构造存放学生信息的结构体数组,并按分数大小输出)
最新推荐文章于 2023-05-15 14:13:52 发布