I have a better odd/even function:
bool isEven( long long x ) {
if ( x < 0 ) x = -x;
if ( x == 1 )
return false;
if ( x == 2 )
return true;
return isEven( x - 2 );
}
This will work for both negative numbers and arbitrarily large integers. I've tested it up to 26 but I'm pretty sure it will work up to infinity.
Though serious question: Why are these forums coded in such a way that they ignore single newlines? How hard is it to replace a newline with a br tag?
Edit: added two spaces, should look much better.
Edit2: just looks a bit better lol
Edit3: better now?