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
Elenna [48]
3 years ago
8

Which code snippet calculates the sum of all the even elements in an array values? Group of answer choices int sum = 0; for (int

i = 0; i < values.length; i++) { if ((values[i] % 2) == 0) { sum++; } } int sum = 0; for (int i = 0; i < values.length; i++) { if ((values[i] % 2) == 0) { sum += values[i]; } } int sum = 0; for (int i = 0; i < values.length; i++) { if ((values[i] / 2) == 0) { sum++; } } int sum = 0; for (int i = 0; i < values.length; i++) { if ((values[i] / 2) == 0) { sum += values[i]; } }
Computers and Technology
1 answer:
olganol [36]3 years ago
5 0

Answer:

The second one:

int sum = 0; for (int i = 0; i < values.length; i++) { if ((values[i] % 2) == 0) { sum += values[i]; } }

You might be interested in
Every application program has a _______________ segment
Natali5045456 [20]
"Main" goes in the blank. For example in C++ all of your code goes in the main function.
4 0
3 years ago
Create an Entity-Relationship Diagram with the following requirements.
melamori03 [73]

Answer:

idk

Explanation:

6 0
3 years ago
Answer for 3.4.8 rectangle code HS
tigry1 [53]

Answer:

i think Make variables to represent the length and width of a rectangle, called length

and width

, respectively. You should set length

to 10 and width

to 5.

Then, write some mathematical expressions to computer the area and perimeter of the rectangle and save these values inside variables named area and perimeter

.Use print

statements to display the area and perimeter of the rectangle.

Your output should print the area on the first line and the perimeter on the second, like this:

50 30  Rectangle Area Formula:

Area = L * W

Explanation:

7 0
3 years ago
Drag each connector name to match the connector type shown.
Setler79 [48]

Answer:

The first one is usb-c, the second is mini-usb, the third is micro-usb.

Explanation:

8 0
3 years ago
Int[] myArray1= new int[24]; int[] myArray2= new int[10]; float[] myArray3= new float[8]; int index1, index =0 for(int index1 =0
anastassius [24]

Answer:

The value of myArray2[index2] when index1 = 12 is 30

Explanation:

In the source code, the formula for myArray2[index2] is;

   myArray2[index2] = index2 + index3 + myArray1[index1],

   myArray1[index1] = index1 * 2,

   index2 = index % 10 (equal to the remainder) and

   index3  = index % 8

When index1 increases to 12 in the for-loop statement, the "myArray1[index1]" is equal to 24, index2 is equal to 2 and index3 is 4. The total sum is equal to 30 and assigned to "myArray2[index2]".

3 0
3 years ago
Other questions:
  • In which career field would the computing technology industry associations compTIA A+ certification be useful
    6·1 answer
  • Două numere a și b sunt numite generatoare ale unui număr natural n dacă a∙b+[a/b]=n, unde s-a notat cu [c] partea întreagă a nu
    7·1 answer
  • _______ allows you to specify how a photo is positioned in the text of your document.
    11·1 answer
  • Data ____ travel over the Internet from router to router until reaching their destinations.
    7·1 answer
  • Which statement about images is correct? A) A virtual image cannot be formed on a screen. B) A virtual image cannot be viewed by
    12·1 answer
  • g Define memory hierarchy. A. The rate at which information can be transferred from one place to another. B. Ordering storage sy
    8·1 answer
  • Now tell me how be rich like Bill Gates
    6·1 answer
  • A(n) ________ operator, such as the greater than or less than symbol, can be used in a query criterion to limits the results pro
    12·2 answers
  • Need help please. this effect my technology
    15·1 answer
  • Old systems can be useful when designing new computer software.<br> True or False
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!