subject

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

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
Terri needs to insert a cover page into her document. where should she go to access the commands to do so? o insert tab, objects group o insert tab, illustrations group o insert tab, pages group o insert tab, media group submit
Answers: 1
question
Computers and Technology, 23.06.2019 03:00
Your business be in google top rank.more the rank more the business leads.for best seo and digital marketing services be confident to contact you can get best seo solutions by assistance experts provide digital marketing, website development, seo expert services and social media internet seo expert services your branding solutions. seo expert services ,best seo expert services,online seo expert services,
Answers: 3
question
Computers and Technology, 23.06.2019 04:31
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
question
Computers and Technology, 23.06.2019 21:50
Description: write function lastfirst() that takes one argument—a list of strings of the format "lastname, firstname" —and returns a list consisting of two lists: (a) a list of all the last names (b) a list of all the first names
Answers: 2
You know the right answer?
What does the following loop do?

int[] a = {6, 1, 9, 5, 12, 3};
int len = a. l...
Questions
question
Mathematics, 23.11.2020 18:30
question
Computers and Technology, 23.11.2020 18:30
question
Mathematics, 23.11.2020 18:30
question
English, 23.11.2020 18:30
Questions on the website: 13722361