Program to check odd or even number in c++ programming language


#include<iostream>

using namespace std;

int main()

{

	int a;

	cout << "enter the value of a:";

	cin >> a;

	if (a % 2 == 0)

		cout << "this number is even";

	else

		cout << "this number is odd";

	getchar();

	getchar();

	return 0;

}      

          

       
 

Comments

Popular posts from this blog

Multiple inheritance,friend function and multiple file in oop(object oriented programming)

Concepts of OOP (object oriented programming)

Concepts in c++........