fun main() { for (i in 1..10) { if (i == 5) { break } println("i = $i") } println("Loop finished") }
Click Run to execute this code.