Any ideas on the simplest way to test if an integer is odd or even?
I want to be able to do something like this:
There must be something built into C++
or do I need to have a little divide by 2 into float and check it kind of function?
I want to be able to do something like this:
Code:
if(isEven(someVar)==1){
//...
}else{
//...
}
There must be something built into C++