#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int x;
cout<<"Enter any number : ";
cin>>x;
if ( x % 2 == 0 )
cout<<endl<<x<<" is Even number"; //Remember 0 is an even number
else
cout<<endl<<x<<" is Odd number";
getch();
}
#include<conio.h>
void main()
{
clrscr();
int x;
cout<<"Enter any number : ";
cin>>x;
if ( x % 2 == 0 )
cout<<endl<<x<<" is Even number"; //Remember 0 is an even number
else
cout<<endl<<x<<" is Odd number";
getch();
}
No comments:
Post a Comment