List of students' grades

Report a typo

You have a list of grades of students in your class. Please print the grades following the LIFO strategy. For example, if you have 5, 7.5, 9.9, you must obtain: 9.9, 7.5, 5.

Sample Input 1:

5.5 4.6 3.0 2.5 10.0 9.9 8.75

Sample Output 1:

8.75 9.9 10.0 2.5 3.0 4.6 5.5
Write a program in Kotlin
import java.util.*

fun main() {
val list = readln().split(" ").map{ it.toDouble() }
// write your code here

}
___

Create a free account to access the full topic