-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
44 lines (31 loc) · 913 Bytes
/
main.cpp
File metadata and controls
44 lines (31 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#define _CRT_SECURE_NO_WARNINGS
/*************************************************
** 功能 : 学生成绩管理系统
** 版本 : v1.0
** 版权 : GNU General Public License(GNU GPL)
/**************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include "score.h"
/*----------------------------------*
主函数
*-----------------------------------*/
int main()
{
/*-1.变量初始化-*/
int N = 0; //学生总数
SS *pstu = NULL; //学生数组-结构体数组指针实现
//2.读取学生信息
pstu = readDataFromFile(&N);
/*-3.计算学生总成绩(总成绩 = 0.2*平时成绩 + 0.8*期末成绩)--*/
calcuScore(pstu, N);
/*-4.根据学生成绩排名-*/
sortScore(pstu, N);
/*-5.按照排名输出学生信息-*/
printOut(pstu, N);
/*-6.释放动态内存空间-*/
free(pstu);
system("pause");
return 0;
}