In the following example, we will check whether the given number is an Odd number or Even 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";