Student Score Analysis


Submit solution

Points: 10
Time limit: 1.0s
Memory limit: 10M

Authors:
Problem type
Allowed languages
Java 19

某班有 3 位學生,每位學生有國文、英文、數學 3 科成績,請使用二維陣列計算以下需求。

  • 輸入:共 3 行,每行 3 個整數,分別代表一位學生的「國文、英文、數學」成績,數字之間以空白分隔。
  • 輸出:
    1. 計算每位學生的平均分數 (保留一位小數)
    2. 計算每科平均分數 (保留一位小數)

Sample Input / Output

Sample 1

Input

85 78 92
75 88 80
90 85 87

Output

Student 1 Avg: 85.0
Student 2 Avg: 81.0
Student 3 Avg: 87.3
Chinese Avg: 83.3
English Avg: 83.7
Math Avg: 86.3

Sample 2

Input

60 70 80
90 85 88
75 95 85

Output

Student 1 Avg: 70.0
Student 2 Avg: 87.7
Student 3 Avg: 85.0
Chinese Avg: 75.0
English Avg: 83.3
Math Avg: 84.3

Sample 3

Input

100 100 100
80 85 90
70 75 80

Output

Student 1 Avg: 100.0
Student 2 Avg: 85.0
Student 3 Avg: 75.0
Chinese Avg: 83.3
English Avg: 86.7
Math Avg: 90.0


Comments

There are no comments at the moment.