subject

Given the following code, what logic would you need to include to determine how many times the number 2 appears within the array: int[] myArray = {1,2,3,2,5,6,2,8,2,10};

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

//your code goes here

}

Sample Output: The number 2 appears 4 times in this array.

NOTE: Your response should be just the missing logic--not the entire problem set.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:30
By refraining from constructing a building until they are certain that it will not cause harm to the environment, an organization is adhering to the
Answers: 2
question
Computers and Technology, 22.06.2019 09:30
Is a string of code written to hurt others by damaging or destroying
Answers: 1
question
Computers and Technology, 23.06.2019 12:30
How is the brightness of oled of the diaplay is controled
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
Need ! will choose brainliest! discuss the role of abstraction in the history of computer software.
Answers: 1
You know the right answer?
Given the following code, what logic would you need to include to determine how many times the numbe...
Questions
question
Mathematics, 13.05.2021 18:10
question
SAT, 13.05.2021 18:10
question
Chemistry, 13.05.2021 18:10
question
Mathematics, 13.05.2021 18:10
Questions on the website: 13722363