#C13379. Student Grade Calculator

    ID: 42910 Type: Default 1000ms 256MiB

Student Grade Calculator

Student Grade Calculator

You are given information about a student including the student's name, ID, and marks in three subjects. Your task is to implement a program that computes the average marks and determines the corresponding grade. The average is computed as:

\(\text{Average} = \frac{m_1 + m_2 + m_3}{3}\)

The grading criteria are as follows:

  • Grade A: average \(\geq 90\)
  • Grade B: average \(\geq 80\) and less than 90
  • Grade C: average \(\geq 70\) and less than 80
  • Grade D: average \(\geq 60\) and less than 70
  • Grade F: average less than 60

The program should read input from standard input and output the student's details including name, ID, average marks, and grade to standard output.

inputFormat

The input consists of three lines:

  1. The first line contains the student's name (a string).
  2. The second line contains the student's ID (an integer).
  3. The third line contains three integer marks separated by spaces.

outputFormat

The output should display four lines:

  1. Name: followed by the student's name.
  2. ID: followed by the student's ID.
  3. Average Marks: followed by the computed average marks (as a floating point number).
  4. Grade: followed by the grade based on the computed average.
## sample
Alice
123
70 80 90
Name: Alice

ID: 123 Average Marks: 80.0 Grade: B

</p>