Find even or odd number in C ++ Language

Find even or odd number in C ++ Language:

To find even or odd numbers in C++ language. The program code is given below:

Code of the program:

// Find Even or odd no.

#include<iostream>
using namespace std;
int main()
{
int a;
cout << "Enter Any No" << endl;
cin >> a;
if (a % 2 == 0)
{
cout << "Number is Even" << endl;
}
else
{
cout << "Number is Odd" << endl;
}
}

Download this code:

click on the given link below:

Comments