![rydersasser12](/avatars/33703.jpg)
rydersasser12
17.12.2019 •
Computers and Technology
What does the following loop do? int[] a = {6, 1, 9, 5, 12, 3}; int len = a.length; int x = 0; for (int i = 0; i < len; i++)if (a[i] % 2 == 0) x++; system.out.println(x); 1. sums the even elements in a.2. finds the largest value in a.3. counts the even elements in a.4. finds the smallest value in a.
Solved
Show answers
More tips
- F Food and Cooking How to Make Cottage Cheese Casserole? A Proven Recipe...
- L Leisure and Entertainment How to Solve a Rubik s Cube Easily and Quickly...
- H Health and Medicine Want to Lose Weight? Gain Muscle without Damaging Your Health!...
- F Family and Home Parquet or laminate, which is better?...
- L Leisure and Entertainment How to Properly Wind Fishing Line onto a Reel?...
- L Leisure and Entertainment How to Make a Paper Boat in Simple Steps...
- T Travel and tourism Maldives Adventures: What is the Best Season to Visit the Luxurious Beaches?...
- H Health and Medicine Kinesiology: What is it and How Does it Work?...
- O Other How to Choose the Best Answer to Your Question on The Grand Question ?...
- L Leisure and Entertainment History of International Women s Day: When Did the Celebration of March 8th Begin?...
Answers on questions: Computers and Technology
- C Computers and Technology Why is continual user involvement a useful way to discover system requirements? under what conditions might it be used? under what conditions might it not be used?...
- B Business National Safety Inc., an insurance firm, replaced its existing project management software with new software from another supplier. Since the new software has different...
- M Mathematics what is y=−7x+8 y=−7x−8...
- P Physics A 280-m-wide river flows due east at a uniform speed of 4.7m/s. A boat with a speed of 7.1m/s relative to the water leaves the south bank pointed in a direction...
Ответ:
The answer is "Option 3"
Explanation:
The description of the above java code can be given as:
In the given code an array initialized elements in the next line an integer variable that is "len" is define this variable holds a length of the array and another variable "x" is defined that holds value 0. Then we use loop in loop a conditional statement is used that checks in array if any number is even. If this condition is true so the value of x variable increases by 1 and prints its value.Ответ:
what is this??
Explanation: