C++ Program to Check Whether numbers digit is Even or Odd code example
Example: number is even or odd c++
if ( n % 2 == 0)
cout << n << " is even.";
else
cout << n << " is odd.";
if ( n % 2 == 0)
cout << n << " is even.";
else
cout << n << " is odd.";