Problem Description
The final exam is over, the teacher wants to divide the grade according to the students ' grades. There are 5 grades A,b,c,d and E.
The Division method is as follows, 90 points (including 90) above for a,80~90 (including 80) between the b,70~80 (including 70) between the C,
60~70 (including 60) for D, the failure of the E.
According to the results of the input, programming output of the number of different levels.
Input
Enter the first row contains a positive integer n (n<= 100) represents the number of students, and then there are n rows of data per line an integer (0~100) represents
A student's score.
Output
The output has five elements in the following format:
A NA
B NB
C NC
D ND
E NE
Among them a,b,c,d,e represents the rank, NA,NB and so on represents the level the number, the level and the number has a space between.
Sample Input
6
66
73
85
99
100
59
Sample Output
A 2
B 1
C 1
D 1
E 1
import Java.util.Scanner public class main{public static void Main (string[) args) {
Scanner cin = new Scanner (system.in);
int T;
int i;
T = Cin.nextint ();
int A, B, C, D, E;
A = b = c = d = e = 0;
int n;
for (i = 1;i <= t;i + +) {n = cin.nextint ();
if (n >=) A + +;
if (n < m && n >=) b + +;
if (n < m && n >=) C + +;
if (n < c && N >=) d + +;
if (n < a) e + +;
} System.out.println ("A" + "" + a);
System.out.println ("B" + "" + B);
System.out.println ("C" + "" + C);
System.out.println ("D" + "" + D);
System.out.println ("E" + "" + e);
Cin.close (); }
}