I am doing an assignment where I am trying to get random numbers between 1-10.
But I dont want any number to come more than one time. I am using the following code.
It chooses random numbers but the output is like
void randomsort ();
int main ()
srand ((unsigned) time(&t));
b[i]= rand() % 11;
It is giving me the number more than ones.
How can I solve this problem? Please help.