C++ Examples
C++ ExamplesPrograms with output

C++ Program to Check Even or Odd


Example:
#include<iostream>
using namespace std;
int main()
{
    int num;
    cout << "Enter any Number: ";
    cin >> num;
    
    if(num%2 == 0)
        cout << "\nIt is an Even Number";
    else
        cout<<"\nIt is an Odd Number";
    
    return 0;
}
Output:
Enter any Number:
7
It is an Odd Number

Share this page on:

Was this page helpful ?

Let us know how we did!

Subscribe Email Updates

to get latest update