Find the number of D, C, B and A grades for the last test on informatics, where n students from a class have successfully passed the test.
The program gets number n as the first line of input. This means there will be n number of grades. Then the program gets the grades themselves, each on a new line.
Create a program to count the the occurrence of each grade and output four numbers in a single line: the number of D, C, B, and A grades (in that order), separated by blank space characters.