Organize your code

Report a typo

You have a piece of code, and you asked a colleague to review it. This code works correctly, but your colleague wants you to better organize it. "I don't like that we define day, month, and year above data. We don't use them in the code below, and I want to ask you to make your code more readable." Using a scope function, make it so that day, month, and year are defined and passed to data at the time of data initialization.

Sample Input 1:

14
11
1983

Sample Output 1:

11.14.1983
Write a program in Kotlin
fun main() {
val day = readln()
val month = readln()
val year = readln()

val data = "$month.$day.$year"

// Do not change the code below
println(data)
}
___

Create a free account to access the full topic