You are making an application to show the lottery numbers. The numbers arrive in a list – display the results in an order from the lowest to the highest value.
Ordering elements in collection
The lottery numbers
Report a typo
Sample Input 1:
23 56 54 28 1Sample Output 1:
[1, 23, 28, 54, 56]Write a program in Kotlin
fun main() {
val list = readln().split(" ").map { it.toInt() }
// write your code here
val res =
println(res)
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.