Original Post
Hey I'm making a little puzzle game, I need to get 6 random numbers, there can't be more then 2 of the same number, there are 4 different numbers that you can get, and you can't get 0, this is what I'm doing now:
while(number == 0)
number = rand()%5
but that sometimes give the same number more than 2 times.. How can i limit it to 2?
Edited by - cafall on 10/21/00 9:25:50 AM