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