Grades

Report a typo

Find how many "D", "C", "B" and "A" grades the students have got after the last Computer Science test. There are n students in the class. The program gets the n number as input and then gets the grades one by one. The program should output four numbers in a single line, representing the number of grades equal to "D", "C", "B" and "A".

Numbers represent the following grades: 2 is "D", 3 is "C", 4 is "B", and 5 is "A".

Sample Input 1:

10
3
5
4
4
2
5
5
5
5
2

Sample Output 1:

2 1 2 5
Write a program in Kotlin
fun main() {
// put your code here
}
___

Create a free account to access the full topic