Posts Tagged: C++ to find even or odd.

Program to print Even or odd number in C++.

To check whether an integer is even or odd, the remainder is calculated when it is divided by 2 using modulus operator ‘%’. If remainder is zero, Then that integer is even if not that integer is odd.