Suppose you need to read the Int value into the variable n. Correct the code below.
Reading data with readln
Fix the input
Report a typo
Write a program in Kotlin
fun main() {
val n: Int = readln()
if (n !is Int) {
println("Wrong Type")
}
println(n)
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.