You are viewing a single comment's thread. Return to all comments →
fun main(args: Array) { val N = readLine()!!.trim().toInt()
if(N>=1 && N<=100) { if(N%2==0) { if(N in 2..5) { println("Not Weird")} else if(N in 6..20) {println("Weird")} else if(N>20) {println("Not Weird") } } else { println("Weird") } }
}
Seems like cookies are disabled on this browser, please enable them to open this website
Day 3: Intro to Conditional Statements
You are viewing a single comment's thread. Return to all comments →
Kotlin
fun main(args: Array) { val N = readLine()!!.trim().toInt()
}