Social Icons

Saturday, 15 February 2014

Program to check whether a number is even or odd

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a;
cout<<"\n Enter a number : ";
cin>>a;

if(a%2==0)
cout<<"\n\t This is Even number";
else
cout<<"\n\t This is Odd number";
getch();
}


                                                        Output

No comments:

Post a Comment