Here is how to create a Scanner in Kotlin
A Scanner is used to reading the user’s inputs in Kotlin. Below is an example of how to create a Scanner and then use it to read the user’s inputs and add them up. Let us run the above program and enter two numbers to get the answer as follows:-