Number checking via C++ (Negative, Possitive, Odd or Even)

Bismillahir Rahmanir Rahim
How can you check the number is  Negative, Positive, Odd or Even.
Now I'm writing a program for number checking.If you don't understand, comment below.I always ready to solve your problem if it's possible by me.
negative, Positive:

#include<iostream.h>
void main()
{
int n;
cout<<"Enter your number: ";
cin>>n;
if(n>0)
cout <<n<<" is positive.";
else if(n<0)
cout <<n<<" is negative.";
else
cout <<n<<" is 0.";
}
Odd or Even:

#include<iostream.h>
void main()
{
int n;
cout<<"Enter your number: ";
cin>>n;
if(n%2==0)
cout <<n<<" is Even.";
else
cout <<n<<" is Odd.";
}

Socializer Widget By Blogger Yard
SOCIALIZE IT →
FOLLOW US →
SHARE IT →