get input in kotlin code example
Example 1: user input in kotlin
fun main() {
val userinput = readLine()
}
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()
}