RosettaCodeData/Task/Integer-comparison/Kotlin/integer-comparison.kotlin

11 lines
278 B
Plaintext

fun main(args: Array<String>) {
val n1 = readLine()!!.toLong()
val n2 = readLine()!!.toLong()
println(when {
n1 < n2 -> "$n1 is less than $n2"
n1 > n2 -> "$n1 is greater than $n2"
n1 == n2 -> "$n1 is equal to $n2"
else -> ""
})
}