1
I am trying to insert a number into a list/array but on condition if are you saying: No get method providing array access
import java.util.Scanner
fun main(){
val input = Scanner(System.`in`)
var num:Int
for(i in 0 until 5){
println("Insira um numero entre 0 e 10: ")
num = input.nextInt()
if(num[i]<0 or num[i]>10{
println("INVALIDO")
}else{
i++
}
}
for(i in num) print(i)
}
num
is an integer and not a list– Jéf Bueno