mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
21 lines
237 B
Kotlin
Vendored
21 lines
237 B
Kotlin
Vendored
var field: Int = 0
|
|
|
|
fun next(): Int {
|
|
return ++field
|
|
}
|
|
|
|
|
|
fun box(): String {
|
|
val task: String
|
|
|
|
do {
|
|
if (next() % 2 == 0) {
|
|
task = "OK"
|
|
break
|
|
}
|
|
}
|
|
while (true)
|
|
|
|
return task
|
|
}
|