However, for some reason the first condition testing for the duplicate value does not work. If the array is empty, then the condition is true. If the value in the array is the same as value varialble, then the condition is set to false.
at the first iteration the array is empty so the condition is true; the value is not in and it is added.
The second iteration should then test to see if the value is already in.
Shouldn't work after the first value is added to the array?
What you need to do is to check all the values in the array before n (i.e. from 0 to n-1) to see if one matches the one that was entered (using a nested loop).
The simple solution would be to have a bool array that indexes from 10 to 100.
1. Initialize the bool array to all false
2. When you get a new int value, look in the bool array to see whether that number has been entered already.
3. If it hasn't, set that bool element to true, and insert the number into your array
4. If it has, give an error message to the user and prompt for another number.
An alternative approach would be to examine the int array every time you're ready to enter another value. This would result in less memory usage, but at the expense of more processor time. You'll have to decide which is more valuable to you.