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.
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.
fun main() {
val number = readln().
val condition = readln().
val result = if (condition) number * 2 else number / 2
}Create a free account to access the full topic