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: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:30
Some of the first computer games were created in the early 1970s by college students experimenting after hours to see what the were capable of doing.
Answers: 3
question
Computers and Technology, 22.06.2019 19:30
The following is an excerpt from a slide presentation. today we will inverse operations solving equations using inverse operations solving inequalities using inverse operations from which part of the presentation does the slide most likely come from? a. introduction b. outline c. body d. conclusion
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Define a function printfeetinchshort, with int parameters numfeet and numinches, that prints using ' and " shorthand. ex: printfeetinchshort(5, 8) prints: 5' 8"
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Could you find out how im still getting an 83 percent on this in edhesive a = input("enter an animal: ") s = input ("enter a sound: ") e = "e-i-e-i-o" print ("old macdonald had a farm, " + e) print ("and on his farm he had a " + a + "," + e) print ("with a " + s + "-" + s + " here and a " + s + "-" + s + " there") print ("here a " + s+ " there a " + s) print ("everywhere a " + s + "-" + s ) print ("old macdonald had a farm, " + e)
Answers: 2
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, 23.07.2019 06:30
question
English, 23.07.2019 06:30
Questions on the website: 13722361