Quote:

you still will only get 5 different values. it's like TWO's try.




I missed the "integer" part.

My updated answer (just off the top of my head):
Code:

ans = (rand5()+rand5()+rand5()+rand5()+rand5()+rand5()+rand5()) / 7;



6 adds, 1 div, and 7 function calls.

Not a great answer, just a first draft.




Conitec's Free Resources:
User Magazine || Docs and Tutorials || WIKI