Exerpad
🔥0
0 XP
Lv.1 Beginner
Log In

Even or Odd

Is a number even or odd? You can figure this out using the remainder operator %. When you divide a number by 2:

  • If the remainder is 0, the number is even
  • If the remainder is not 0, the number is odd

Write a program that reads a number from input and prints even or odd.

rust
fn main() {
}