accepting input from user in kotlin code example
Example 1: user input in kotlin
fun main() {
val userinput = readLine()
}
Example 2: kotlin read input as int
readLine()!!.toInt()
fun main() {
val userinput = readLine()
}
readLine()!!.toInt()