C++ Program to Check Whether Given Number is Even or Odd

In this program, you will learn to check whether a number entered by the user is even or odd.

Source Code
using namespace std;

int main()
    int no;
    cout<<"Enter a number: ";
    cin>> no;

    if(no%2 == 0)
        cout<<"Number is Even number";
        cout<<"Number is Odd Number";
    return 0;
Enter a number: 15
Number is Odd Number

Enter a number: 84
Number is Even number