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 08:30
Today is the anniversary of me being on yet, i don't need it anymore! here's a picture of my dog wearing a bowtie! my question is, how do i delete my account?
Answers: 1
question
Computers and Technology, 23.06.2019 05:20
What did creator markus “notch" persson initially call his game
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
What is the local portion of the e-mail address below? [email protected] a.) @ b.) biz c.) gumchewer d.) twrigley
Answers: 1
question
Computers and Technology, 24.06.2019 22:00
Is the process of organizing data to reduce redundancy. a. normalization b. primary keying c. specifying relationships d. duplication
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, 10.05.2021 01:50
question
Mathematics, 10.05.2021 01:50
question
Mathematics, 10.05.2021 01:50
question
Mathematics, 10.05.2021 01:50
question
Mathematics, 10.05.2021 01:50
question
Physics, 10.05.2021 01:50
Questions on the website: 13722367