Followers

Saturday, December 3, 2011

CHECK EVEN OR ODD NUMBER

#include<iostream.h>
#include<conio.h>

void main()
{
 clrscr();
 int a;
 cout<<"Enter any number : ";
 cin>>a;
 (a%2==0)?cout<<"Even number":cout<<"Odd number";
 getch();
}
.................................................................
OUTPUT:(click on image to enlarge)

No comments:

Post a Comment