List of students' grades

Report a typo

Taking a collection of qualifications as a sequence, obtain the average grade of the students who have passed the exam. Remember that an exam has been passed if your grade is greater than 5.

Sample Input 1:

5.5 4.6 3.0 2.5 10.0 9.9 8.75

Sample Output 1:

8.5375
Write a program in Kotlin
fun main() {
val listOfGrades = readln().split(" ").map { it.toDouble() }.asSequence()
// write your code here

}
___

Create a free account to access the full topic