「Kotlin入門」while文を使うサンプル
書式
while(条件式){some code}
使用例
fun main() { var m = 10 while (m < 20) { println("value = " + m) m++ } }
実行結果
>kotlinc arkgame.kt -include-runtime -d arkgame.jar
>kotlin arkgame.jar
value = 10
value = 11
value = 12
value = 13
value = 14
value = 15
value = 16
value = 17
value = 18
value = 19