I/O prompt to user


#1

How would I ask the user to enter data ?


#2

To enter data from where? From console you can use readLine()


#3

@elizarov I would want to allow the user to enter data via the keyboard the an operation would be performed on it. e.g. Enter number, user enters 6, 6 is multiplied by 2, console returns 12.


#4

Use println to print the data and readLine() to read a string.


#5

@elizarov Yes I know that. I think the issue is how I design the program.

IS it that I begin with

fun main(args: Array<String>) {


} 

THEN I enter readline line ?

Where would I put println ?

I apologize in advance for these simple and possibly stupid questions. I am NEW to programming and Kotlin.

WHAT would the algorithm I described in my previous post look like?