Hi ladies and gentlemen,
Gotta question,
I have a program in wich I make a small array of 100 random numbers wich are smaller then 1000!
Like this:
# define MAX 100
void srand(int tabel[MAX]);
void srand(int tabel[MAX])
{
for (int i=0;i<MAX;i++)
do
tabel[i]=rand();
while (tabel[i]>1000);
}
This of course is only one part of the program and as you can see this array is made with a function! Now, this way I get random numbers but there are several numbers in that array wich are shown twice or even more times, how can I change this program so it doesn't use the same number twice?
Can anyone please help me out?
Thanks in advance!