Exerpad
🔥 0
0 XP
Exercise 2 · Chapter: ConditionsRequired+50 XP

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() {
}
Output
Run your code to see the output here.