Skip to content

Instantly share code, notes, and snippets.

@labohkip81
Created August 11, 2018 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save labohkip81/3bd77bc38a1b0904290977907f46b322 to your computer and use it in GitHub Desktop.
Save labohkip81/3bd77bc38a1b0904290977907f46b322 to your computer and use it in GitHub Desktop.
This program expounds on the usage of the readln function in kotlin
//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