In the following example, we will check whether the given number is an Even number or Odd number.
#include<iostream>using namespace std;
cout <<"Enter a (int) number: ";
cin >> num;
cout << num <<" is an even number";
cout << num <<" is an odd number";