I am a beginner of C#. I have a question below that needs help. The question is: to find the smallest integer that is not in a random array. For example, the smallest integer would be 2 for an array as [1,3,5,9].
For this question, the steps are:
1) Create a random list of integer numbers falling between 0 and 10000. The user can specify how many numbers to be generated in this range - let's put this in a variable N. So if N = 4, then 4 numbers to be generated that fall between 0 and 10000.
2) introduce the list of random numbers into an array.
3) Based on the array, to find the smallest integer that is not in the array.
This question may be quite easy for C# experts. Sorry I just started. Thanks for your help.
For this question, the steps are:
1) Create a random list of integer numbers falling between 0 and 10000. The user can specify how many numbers to be generated in this range - let's put this in a variable N. So if N = 4, then 4 numbers to be generated that fall between 0 and 10000.
2) introduce the list of random numbers into an array.
3) Based on the array, to find the smallest integer that is not in the array.
This question may be quite easy for C# experts. Sorry I just started. Thanks for your help.