Help random numbers rand() returns same numbers
I am trying to make a blackjack program which uses srand() with time as seed to determine random number of card between 1-10. Two problems, one is that the first three returned numbers are always similar and one digit or so more than the next three ones. They dont seen random.
Another problem is that, i have to put Sleep for 1 sec between calling the random function again because if time is same seconds, it returns the same random number. Any way i can solve it easily, because its only grade 11 project at school.
Please compile my program in devCPP and try the random number thing a few times, you will know what i mean--
Edited 5 Years Ago by bbman: n/a