Answer:
The following code completes the program
for (i = 0; i < userValues.length; i++) {
if(userValues[i] == matchValue){
nuMatches++;
} }
System.out.println(nuMatches);
Explanation:
The question is poorly formatted. So, I correct the poorly formatted program segment and I complete the missing part of the program.
See attachment for complete program.
The explanation is as follows:
This iterates through the array
for (i = 0; i < u s e r V a l u e s. length; i++) {
This checks if the current array element is the same as the match value
if(userValues[i] == matchValue){
If yes, the number of matches is increased by 1
nuMatches++;
} }
This prints the number of matches
System.out.println(nuMatches);