Files
kotlin-fork/compiler/testData/codegen/controlStructures/ifInWhile.kt
T
2013-01-24 21:12:27 +04:00

15 lines
335 B
Kotlin

import java.lang.Runtime
fun box() : String {
val processors = Runtime.getRuntime()!!.availableProcessors()
var threadNum = 1
while(threadNum <= 1024) {
System.out?.println(threadNum)
if(threadNum < 2 * processors)
threadNum += 1
else
threadNum *= 2
}
return "OK"
}