C++20 sections · 1024 units
Open in Course

Challenge: Even or Odd

Use the modulo operator

The modulo operator % gives you the remainder of division. If a number divided by 2 has remainder 0, it's even! Your task: Read an integer and print Even if it's even, Odd if it's odd.