Read data correctly

Report a typo

We have a program that takes input and multiplies it by two if the condition is true, otherwise, the input will be divided by two instead.

Fill in the blanks so that the program will run correctly with no errors.

Fill in the gaps with the relevant elements
fun main() {
    val number = readln().
    val condition = readln().

    val result = if (condition) number * 2 else number / 2
}
toString()toBoolean()toInt()

Create a free account to access the full topic