I/O prompt to user


How would I ask the user to enter data ?


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


@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.


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


@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?