#K54962. Student Score Categorization
Student Score Categorization
Student Score Categorization
You are given the scores of students in three subjects: Mathematics, Physics, and Chemistry. For each student, compute the average score using the formula $$\text{Average} = \frac{\text{Mathematics} + \text{Physics} + \text{Chemistry}}{3}$$. Based on this average score, classify the student into one of the following categories:
- Excellent: if the average score is at least 90.
- Good: if the average score is at least 70 but less than 90.
- Average: if the average score is at least 50 but less than 70.
- Poor: if the average score is less than 50.
Your task is to read the input from standard input, process each student's scores, and output their corresponding categories to standard output. Each category should be printed on a new line.
inputFormat
The first line of input contains a single integer n
representing the number of students. Each of the following n
lines contains three space-separated integers representing the scores in Mathematics, Physics, and Chemistry respectively.
outputFormat
Output n
lines where each line contains the category of the corresponding student based on the average of their scores.
2
95 91 92
100 99 98
Excellent
Excellent
</p>