subject

The divBySum method is intended to return the sum ofall the elements in the int arrayparameter arr that are divisible by the intparameter num. Consider the following examples, in whichthe array arrcontains {4, 1, 3, 6, 2, 9}.The call divBySum(arr, 3) will return 18,which is the sum of 3, 6, and 9,since those are the only integers in arr that aredivisible by 3.The call divBySum(arr, 5) will return 0,since none of the integers in arr are divisibleby 5.Complete the divBySum method using anenhanced for loop. Assume that arr isproperly declared and initialized. The method must use anenhanced for loop to earn full credit./** Returns the sum of all integers inarr that are divisible by num* Precondition: num > 0*/public static int divBySum(int[] arr, int num)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:00
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
This graph compares the cost of room and board at educational institutions in texas.
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Select the correct answer from each drop-down menu. which types of computer networks are bigger as well as smaller than a man? a man is a network of computers that covers an area bigger than a , but smaller than a .
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
To check whether your writing is clear , you can
Answers: 2
You know the right answer?
The divBySum method is intended to return the sum ofall the elements in the int arrayparameter arr t...
Questions
question
Mathematics, 11.09.2020 01:01
question
Mathematics, 11.09.2020 01:01
question
Mathematics, 11.09.2020 01:01
question
Social Studies, 11.09.2020 01:01
question
Mathematics, 11.09.2020 01:01
question
Mathematics, 11.09.2020 01:01
question
Mathematics, 11.09.2020 01:01
question
Mathematics, 11.09.2020 01:01
question
Mathematics, 11.09.2020 01:01
question
English, 11.09.2020 01:01
question
Mathematics, 11.09.2020 01:01
question
English, 11.09.2020 01:01
question
Mathematics, 11.09.2020 01:01
question
Chemistry, 11.09.2020 01:01
question
Mathematics, 11.09.2020 01:01
question
Mathematics, 11.09.2020 01:01
question
Mathematics, 11.09.2020 01:01
question
Social Studies, 11.09.2020 01:01
question
Mathematics, 11.09.2020 01:01
question
Mathematics, 11.09.2020 01:01
Questions on the website: 13722363