C++ program to check even odd number

In this article, you will learn a C++ program to check even odd number. Most people are familiar with even odd concepts from their childhood studies.

Even numbers are those numbers that are divisible by 2 with 0 remainder. While odd numbers are not divisible by 2.

Here you check some even and odd numbers.

cpp program to check even odd numbers

Example: Check even odd in C++

#include <iostream>
using namespace std;

int main() {
  int number;

  cout << "Enter any Number: ";
  cin >> number;

  if ( number % 2 == 0)
    cout << number << " is even number!";
    cout << number << " is odd number!";

  return 0;

Output 1

cpp even odd output

Output 2

odd numbers in cpp output

Recommended Articles

C++ program to check palindrome numbers

C++ program to add two numbers using pointers