Skip to main content

C++ program to find the even and odd numbers


When even numbers are divided by 2, the output will be 0, modulus of odd numbers with 2 gives the output value of 1.

Even Odd Numbers


C++ Program to find even and odd numbers using if-else condition


#include <iostream>
using namespace std;


int main() {
    int n;
    cout << "Enter an integer: ";
    cin >> n;
    if ( n%2 == 0) 
        cout << n << " is even.";
    }
    else {
        cout << n << " is odd.";
    }
    return 0;
}

Popular posts from this blog

eLitmus pH test for freshers

eLitmus has became more famous in conducting pH test for the fresh graduates in India. They will evaluate candidates across India and to provide a standard benchmark against which companies can compare them.


Who can apply

Candidates having/pursuing a degree in BE/B.Tech, MCA, ME/M.Tech or M.Sc(CS/IT) can apply for the pH test.

Companies recruiting from pH test

List of companies

Look at test centers

Check the upcoming pH tests

Look at the testimonials

Read what the candidates appeared for this exam says about eLitmus.

Test Pattern

Test duration : 2 hours
No of questions : 60

It will be asked from 3 categories,

Syllabus

20 : Problem solving
20 : Verbal ( You need to read the paragraph and answer the questions )
20 : Quantitative ( Data interpretation )

Four options will be provided for each question. Test will be conducted online.

Payment methods

Fresh graduates appearing for the test has to pay Rs 920/- as a test fee.

They can pay online or send a DD or in cash at Bangalore eLitmus office.

By Online: If y…