Kotlin for과 while, 2024-03-18

sunj - Mar 18 - - Dev Community
var sum : Int = 0
for ( i in 1...100 ){
    sum+= i
}
println(sum)
Enter fullscreen mode Exit fullscreen mode
var index = 0
while(index<10){
   println("current index : ${index}")
   index++
}
Enter fullscreen mode Exit fullscreen mode

참조 : 유투브 강의 Code with Joyce

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player