0
Little Help(Not getting output here)
MY QUESTION AND CODE: https://code.sololearn.com/ca4a23a12A14/#kt Not getting the desired output here.
3 ответов
0
Saurav Singh
The syntax to take integer input is this
fun main(args: Array<String>) {
var a = readLine()!!.toInt()
var b = readLine()!!.toInt()
println(a+b)
}
https://code.sololearn.com/cIoF9O0n8yuk/?ref=app
0
Yes This is kotlin.
Sorry about my mistake but what did I do wrong?
0
Saurav Singh
There is
import java.util.Scanner
And
System.`in` but this is not working on Sololearn because of restrictions of this type of character (` `) to use in code.
So use readLine to get input