take integer input in kotlin# code example
Example 1: kotlin read input as int
readLine()!!.toInt()
Example 2: how to get char input in kotlin
import java.util.Scanner
fun main(args: Array<String>) {
val scanner = Scanner(System.`in`)
val chr = scanner.next().single()
}