0
Can not decide
I have been trying to solve this problem for a very long time. I ask for help. You need to add the numbers in the range. fun main(args: Array<String>){ val lit1 = readLine() !!.toInt() val lit2 = readLine() !!.toInt() for (x in lit1..lit2){ } }
2 odpowiedzi
+ 3
Regaliv Derif
sum = 0
for (x in li1..lit2) {
sum += x
}
println (sum)
0
I didn’t think to deduce println(sum) from the loop body