In this post we are going to understand how to find whether a given number is an even number or an odd number. Let’s see how the program logic works:

#### Explanation:

- User enters a number.
- IF number is divisible by 2 i.e. if (number % 2 == 0) then number is even otherwise odd.

Now lets the write the program to implement the same.

### Program to find even odd number in C++:

#include <iostream> using namespace std; int main() { int number; cout << "Enter any integer: "; cin >> number; if(number % 2 ==0) cout << number << " is even number."; else cout << number <<" is odd number."; return 0; }