When I read some question to write random nuber generator ,I saw that function and it efficient but it is written in C#. I want see that function in form of c language,can anyone help?
IEnumerable<int> ForLargeQuantityAndRange(int quantity, int range)
{
for (int n = 0; n < quantity; n++)
{
int r = Random(range);
while (!used.Add(r))
r = Random(range);
yield return r;
}
}