Small calculator

Report a typo

When writing code, a programmer made an error. Look at the code below and fix the error to restore the code to work.

Write a program in Kotlin
interface InterfaceTask {
protected fun taskFunction(variable: List<Int>)
}

class TaskClass : InterfaceTask {
override fun taskFunction(variable: List<Int>) {
println("${variable[0] + variable[1]}")
}
}
___

Create a free account to access the full topic