1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lisa [10]
3 years ago
5

Finding values in an array

Computers and Technology
1 answer:
hjlf3 years ago
8 0

Answer:

The following code completes the program

for (i = 0; i < userValues.length; i++) {

     if(userValues[i] == matchValue){

         nuMatches++;

     }  }

 System.out.println(nuMatches);

Explanation:

<em>The question is poorly formatted. So, I correct the poorly formatted program segment and I complete the missing part of the program.</em>

<em>See attachment for complete program.</em>

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);

Download txt
You might be interested in
"Inheritance is the process by which a new class - known as a _________ - is created from another class, called the ____________
Novay_Z [31]

Answer:

child class

parent class

Explanation:

"Inheritance is the process by which a new class - known as a __child class__ - is created from another class, called the __parent class__. "

3 0
3 years ago
If I add a # symbol in front of the cells row/column, it will keep the value true.
jonny [76]
I think trueeeeeeeeeeeeeeeeee
3 0
3 years ago
Read 2 more answers
9.A major step before taking print of the document is (3 points)
olya-2409 [2.1K]

Answer:

Uhyuuuuufuddirueueurururururru

8 0
3 years ago
Is playing hockey output force or input force?
LUCKY_DIMON [66]

Answer:

Input

Explanation:

got it right on a edunuity test

7 0
3 years ago
Read 2 more answers
In what location along a river are you most likely to find a hydropower plant?
saul85 [17]

Answer:

I need help with that too I have that too

Explanation:

3 0
3 years ago
Other questions:
  • Two electronics students are discussing electrical units. Student A says that electrical power is measured in units called coulo
    5·1 answer
  • Which of the following statements about light-emitting diodes is correct
    11·1 answer
  • (08.03 MC) Maya is a senior in high school and would like to pursue a career in web design. She needs more information about wha
    11·2 answers
  • _____ is the software that protects you computer from harmful files, Trojan horses, and worms.
    13·2 answers
  • Using the find and replace tool would be most appropriate when
    6·2 answers
  • Which commands are on the right-most side of the Title bar? (From Microsoft Word)
    9·1 answer
  • Line installers must complete a four-year university degree program in order to be hired.
    5·2 answers
  • Plz help
    5·1 answer
  • What is closeable interface in java.
    12·1 answer
  • Is this statement true or false? While in slide show mode, if you are not careful you can close the application by clicking the
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!