From 260b67b66b4216857c6f795c9412a56563e95a05 Mon Sep 17 00:00:00 2001 From: p56isruwj <3475735425@qq.com> Date: Mon, 13 Nov 2023 22:30:26 +0800 Subject: [PATCH] ADD file via upload --- 学籍管理系统 步骤3.c | 78 ++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 学籍管理系统 步骤3.c diff --git a/学籍管理系统 步骤3.c b/学籍管理系统 步骤3.c new file mode 100644 index 0000000..5fb6658 --- /dev/null +++ b/学籍管理系统 步骤3.c @@ -0,0 +1,78 @@ +#include +#define N 3 + +struct stu_info +{ + int num; + float math,physics,english,sum,average; +}; + +struct stu_info stu[N]; + +void sort(struct stu_info *stu) +{ + int i,j; + struct stu_info tmp; + for(i=0;iaverage>(stu+j+1)->average) + { + tmp = *(stu+j); + *(stu+j) = *(stu+j+1); + *(stu+j+1) = tmp; + } + } + } + return; +} + +void input(void) +{ + int i; + for(i=0;i