Computers and Technology

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 04:31, Remba
Q14 what is most important for you to choose before you build a network? a. private network b. nos c. network media d. network protocol e. directory service
Answers: 1
image
Computers and Technology, 23.06.2019 10:00, karissanichole18
Install and use wireshark program ( send back screen shots and other vital information) case project 3-2: decode a tcp segment in a wireshark capture in this chapter, you walked through tcp segment to interpret the data included in its header. in this project, you use wireshark to capture your own http messafes, examine the tcp headers, and practice interpreting the data you'll find there. 1. open wireshark and snap the window to one side of your screen. open a browser and snap that window to the other side of your screen so you can see both windows.
Answers: 2
image
Computers and Technology, 24.06.2019 00:00, BluedragonKBT44
The gene form of a trait is called a(n) 
Answers: 2
image
Computers and Technology, 25.06.2019 14:00, bdawg9716
Do the shape of a sign gives you a clue about the information contained on the sign
Answers: 1
Do you know the correct answer?
Given the following code, what logic would you need to include to determine how many times the numbe...

Questions in other subjects:

Konu
Mathematics, 11.04.2020 12:10
Konu
Spanish, 11.04.2020 12:12
Konu
Mathematics, 11.04.2020 12:27