We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
Try it yourself, you may find it is not as difficult as you think!
If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!
But I'll give you a few pointers:
1) Look at the Random Class:
[
^] - it has a GetNext method which takes an upper and lower limit on the return value which allows you to select five digit numbers.
2) Get the count from the user, and look at using
int.TryPasre[
^] to convert it to an integer value. (Or better, use a NumericUpDown control instead of a TextBox and get the validated value directly.
3) Use a loop with the result of (2) to call (1) repeatedly.
To prevent repeats, I'd fill a List<int> with all the valid five digit numbers, and then use the Random class to select an index into it. Once selected, remove the value from the List (which will reduce the maximum index)