3 like 0 dislike

利用記事本建立如下圖左側的文字檔,檔案名稱取名為「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)
Available when: Unlimited - Due to: Unlimited
| 2 views
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.68.65.252
©2016-2019

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)
Available when: Unlimited - Due to: Unlimited
| 2 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)
Available when: Unlimited - Due to: Unlimited
| 4 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)
Available when: Unlimited - Due to: Unlimited
| 3 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)
Available when: Unlimited - Due to: Unlimited
| 6 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)
Available when: Unlimited - Due to: Unlimited
| 5 views
8,201 questions
63,104 answers
35,691 comments
1,348 users