1Inside the loop use this code only:
2
3isFound = (a[i] == valueToRemove);
4if (isFound) {
5 a[i] = 0;
6 break;
7}
8isFound is the flag and it gets true if the array item a[i] is equal to valueToRemove.
9If this flag is true it changes the value of the item to 0 enter code hereand exits the loop.
10I used a for the array, change it to the name of your variable.
11I guess arraySize is a variable holding the size of the array.