as well. Heck, could even use recursion to cut down on number of lines
int myRandom() {
int rand = random();
return rand ≠ 5 ? rand % 2 : myRandom();
}
(note el jefe changed not equals to the not equals sign.. sigh)
Personally I'd stick with the loop though.