#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

#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