September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -0,0 +1,13 @@
// version 1.0.6
fun main(args: Array<String>) {
val list = listOf(1, 16, 3, 7, 17, 24, 34, 23, 11, 2)
println("The list consists of the following numbers:")
println(list)
val chosen = mutableSetOf<Int>()
println("\nFive elements chosen at random without duplication are:")
while (chosen.size < 5) {
val r = list[(Math.random() * list.size).toInt()]
if (chosen.add(r)) println(r)
}
}