INPUT--
#include<iostream.h>
#include<conio.h>
void main()
{
int no;
clrscr();
cout<<"Enter any num: ";
cin>>no;
if(no%2==0)
{
cout<<"Even num";
}
else
{
cout<<"Odd num";
}
getch();
}
OUTPUT--
Enter any num : 5
Odd num

No comments:
Post a Comment