← Coding round practice

Even or Odd

EasyNumbers & Math

The problem

Check whether a number is even or odd.

Sample input

7

Sample output

Odd
Show the solution · 8 languages
fun main() {
    val n = 7
    println(if (n % 2 == 0) "Even" else "Odd")
}