I am new at Kotlin (and my English is terrible :). I want to define the size of the array and elements in it by inputting it from the keyboard.
fun main() {
val array_size = readLine()!!.toInt()
val arr = IntArray(array_size)
for (i in 0..array_size){
arr[i] = readLine()!!.toInt()
}
for(i in 0..array_size){
println(arr[i])
}
}
[I got this message][1] [1]: https://i.sstatic.net/DRk9F.png This is my first question in StackOverFlow tho, hope it is understandable for those who want to help.