Kotlin Lec 4 2020
Kotlin Lec 4 2020
Программирование на Kotlin
(p.4 – control flow, loops)
sum = 0
for (i in count downto 1 step 2) {
sum += i
}
continue statement
• Sometimes you’d like to skip a loop iteration for a
particular case without breaking out of the loop
entirely.
• You can do this with the continue statement,
which immediately ends the current iteration of
the loop and starts the next iteration.
• The continue statement gives you a higher level
of control, letting you decide where and when
you want to skip an iteration.
Let’s code!
Questions?
Algorithms & Programming
Программирование на Kotlin
(p.4 - control flow, loops)