Array with random non duplicate numbers

I need to create an array that has a fixed number (for example 30) of random non duplicate integers between 1 and 100. Any help will be greatly appreciated!
There are many ways to solve this problem. Must you use only arrays? Or can you use STL sets or bitsets?
Only arrays. We have not studied STL sets or bitsets.
Well, I would create the array, then each time you randomly generate a number, loop through the array and check that the number isn't already in there. If it isn't, put it in, otherwise re-randomize it.
Topic archived. No new replies allowed.