Answers

2014-08-06T17:04:25+08:00
You can use the modulo (%) operator. If it's divisible by 2, that means it's even.

e.g.
int x;
cout<<"enter a number";
cin>>x;
if(x%2==0){cout<<"it is even"<<endl;}
else cout<<"it is odd";
system("pause")

***Note that I used C++
0