This is a simple C++ program that checks whether an entered integer is even or odd.
- The program prompts the user to enter an integer.
- The program checks if the entered integer is even or odd using the modulus operator (
%
). - If the integer is divisible by 2 (i.e.,
num % 2 == 0
), it is even. - If the integer is not divisible by 2, it is odd.
- The program outputs whether the entered integer is even or odd.