number is odd or even in c++ using function code example
Example: even and odd in c++
#include <iostream>
using namespace std;
int main()
{
int n;
cout << "Enter an integer: ";
cin >> n;
(n % 2 == 0) ? cout << n << " Is Even." : cout << n << " Is Odd.";
}