.
//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