RosettaCodeData/Task/Loops-Break/Kotlin/loops-break.kotlin
2016-12-05 22:15:40 +01:00

11 lines
221 B
Text

import java.util.Random
fun main(args: Array<String>) {
val rand = Random()
while (true) {
val a = rand.nextInt(20)
println(a)
if (a == 10) break
println(rand.nextInt(20))
}
}