Created
August 11, 2018 16:02
-
-
Save labohkip81/3bd77bc38a1b0904290977907f46b322 to your computer and use it in GitHub Desktop.
This program expounds on the usage of the readln function in kotlin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//the readline function reads data input by the user into the keyboard | |
//this is similar to the scanner class in java. | |
fun main(args :Array<String>){ | |
print("Enter a number") | |
val dataInput = readLine() | |
println() | |
print("Enter the second number") | |
val secondNumber = readLine() | |
println(dataInput) | |
println(secondNumber) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment