Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 470 Bytes

README.md

File metadata and controls

11 lines (8 loc) · 470 Bytes

Even or Odd Number Checker

This is a simple C++ program that checks whether an entered integer is even or odd.

How it works

  1. The program prompts the user to enter an integer.
  2. The program checks if the entered integer is even or odd using the modulus operator (%).
  3. If the integer is divisible by 2 (i.e., num % 2 == 0), it is even.
  4. If the integer is not divisible by 2, it is odd.
  5. The program outputs whether the entered integer is even or odd.