what about:

Code:
  
int rand7()
{
int answer = rand(5);
answer = (answer<7)?answer+(rand5()-3):answer-rand(5);
return (answer>0)?answer:answer+rand(5);
}



?


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku