3 like 0 dislike
215 views

利用記事本建立如下圖左側的文字檔,檔案名稱取名為「score.txt」。該文字檔內容依序是學生的姓名、中文、英文與數學成績。同時建立一個結構(StuScores) 裡面必須包含姓名(包含 10 個字元的字元陣列 cName),儲存中文(iChi)、英文(iEng)與數學(iMat)的整數變數(int),以及儲存總分 (iTotal)(int 型別)跟平均分數 (fAve) 的變數(float)。寫一個程式,讀入 score.txt  的內容,並將學生的資料儲存到結構陣列(stu)中,同時計算每位學生的總分與平均分,結果也儲存到結構陣列中,計算結束後,將結果輸出到 result.txt 的檔案內(如下右側所顯示)。

 

參考書籍:旗標無痛學習教本

[Normal] Essay (Open question) - asked in Introduction to Computer Programming I (C) by (20.9k points)
ID: 21911 - Available when: Unlimited - Due to: Unlimited
| 215 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.6.16
©2016-2024

Related questions

3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 11, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21910 - Available when: Unlimited - Due to: Unlimited
| 181 views
3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21943 - Available when: Unlimited - Due to: Unlimited
| 246 views
3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21942 - Available when: Unlimited - Due to: Unlimited
| 230 views
3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21941 - Available when: Unlimited - Due to: Unlimited
| 220 views
2 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 11, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21900 - Available when: Unlimited - Due to: Unlimited
| 241 views
12,783 questions
183,443 answers
172,219 comments
4,824 users