+ 7
Kotlin When statements problem .😴
Why this code not running on code playground 🙄🙄 https://code.sololearn.com/ch3Lttd4sQEL/?ref=app
3 Respuestas
+ 7
but it's working in other compiler 🙄
+ 4
Why are you using Java Scanner instead of the Kotlin input. Remove all your current input lines and just replace with;
var a = readLine()!!.toInt()
P.S. the main issue with your use of Java Scanner has to do with the backticks around System`.in`.
Your when statement itself is fine.