Friday 4 July 2014

Program to check whether the number is Even or Odd



.    
//Even or Odd checking
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a;
cout<<"ENTER A NUMBER:";
cin>>a;
if(a%2==0)
cout<<a<<"IS EVEN NUMBER";
else
cout<<a<<"IS ODD NUMBER";
getch();
}

No comments:

Post a Comment