Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
御承扬
disk-file-read-write
提交
c0c6306d
D
disk-file-read-write
项目概览
御承扬
/
disk-file-read-write
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
disk-file-read-write
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
c0c6306d
编写于
5月 10, 2019
作者:
御
御承扬
提交者:
GitHub
5月 10, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Create README.md
上级
b0d223c2
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
46 addition
and
0 deletion
+46
-0
README.md
README.md
+46
-0
未找到文件。
README.md
0 → 100644
浏览文件 @
c0c6306d
# disk-file-read-write
## explain
*
This program realizes the read-write operation of disk file, for example, read the student's score information from scores.txt by line.
*
The student information in the file is as follows
```
姓名 数学分析 高等代数 解析几何
张红 78 94 90
李丽君 65 73 82
成平 94 68 78
王伟 84 86 69
文锦春 74 92 60
林黛玉 66 83 70
付凌云 88 79 82
岳不群 90 82 93
令狐冲 81 77 97
温玉琪 95 84 68
胡建军 85 73 75
刘汉 90 87 89
秋昌平 83 71 74
秦敖天 96 92 95
方世杰 83 90 88
```
*
The next action is to store each line of student information read in the structure studentInfo
*
Then the data in the structure are used to calculate the average score of the course and the average score of each person.
*
The average scores of the courses and the average scores of the students are written into the scoresAnalysis.txt file in a certain format.
*
The situation in the scoresAnalysis.txt file is as follows
```
姓名 数学分析 高等代数 解析几何 平均成绩
张红 78 94 90 87.3
李丽君 65 73 82 73.3
成平 94 68 78 80.0
王伟 84 86 69 79.7
文锦春 74 92 60 75.3
林黛玉 66 83 70 73.0
付凌云 88 79 82 83.0
岳不群 90 82 93 88.3
令狐冲 81 77 97 85.0
温玉琪 95 84 68 82.3
胡建军 85 73 75 77.7
刘汉 90 87 89 88.7
秋昌平 83 71 74 76.0
秦敖天 96 92 95 94.3
方世杰 83 90 88 87.0
各科平均成绩 83.5 82.2 80.7
```
*
The last step is to use the file pointer to read and display the contents of the scoresAnalysis.txt by row to the console window
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录