I need help with rand();. This program produces random number without repeating.

In my error list there are no errors.

Unhandled exception at 0x00414742 c++.exe: 0xC0000094: Integer division by zero.

```
int *numbers,range;
void randomize(unsigned numberToSelect){
for(unsigned i = 0; i < numberToSelect; i++){
const int selectedElement = rand()%(range - i);
const int temp = numbers[selectedElement];
numbers[selectedElement] = numbers[range - i - 1];
numbers[range - i - 1] = temp;
}
}
```