We wrote a program, but it doesn't work.
Please correct the error in the code.
The program must print [10000, 1000000, 100000000].
Constants and val variables
Correct the error
Report a typo
Write a program in Kotlin
fun main() {
const val CONST: Int
val listNumber = mutableListOf<Int>()
CONST = 100
listNumber.add(CONST * CONST)
listNumber.add(CONST * CONST * CONST)
listNumber.add(CONST * CONST * CONST * CONST)
println(listNumber)
}
___
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.