This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
One way would be to remember what was your last result from random, and if it matches your newly picked number, just keep picking them till they don't match. Better solutions would include some kind of a Collection, ie. a Set. Once you draw your number you remove it, next time you pick from what is left in your bag.