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
MaRussiya [10]
2 years ago
9

Use the arr field and mystery () method below.

Computers and Technology
1 answer:
kolezko [41]2 years ago
7 0

Answer:

The sum of all positive even values in arr

Explanation:

We have an array named arr holding int values

Inside the method mystery:

Two variables s1 and s2 are initialized as 0

A for loop is created iterating through the arr array. Inside the loop:

num is set to the ith position of the arr (num will hold the each value in arr)

Then, we have an if statement that checks if num is greater than 0 (if it is positive number) and if num mod 2 is equal to 0 (if it is an even number). If these conditions are satisfied, num will be added to the s1 (cumulative sum). If num is less than 0 (if it is a negative number), num will be added to the s2 (cumulative sum).

When the loop is done, the value of s1 and s2 is printed.

As you can see, s1 holds the sum of positive even values in the arr

You might be interested in
How do i unblock a website on a school computer if a school blocks it?
tresset_1 [31]

Answer:

look up ultrasurf and just follow the thingy and it will download a vpn ive had it on my computer for a fat min

Explanation:

4 0
2 years ago
a sign is to be hung from the end of a thin pole, and the pole supported by a single cable. your design firm brainstorms the six
Angelina_Jolie [31]
The correct answer for the question that is being presented above is this one: "C=F>D>A>B>E" <span>A sign is to be hung from the end of a thin pole, and the pole supported by a single cable. Based from the 6 images, the sequence of inequalities should be C = F > D > A > B > E</span>
4 0
3 years ago
While performing an automatic transmission service at 60,000 miles, the technician notices a grayish sludge on the magnet in the
Evgen [1.6K]

Answer:

Explanation:

One group of students did an experiment to study the movement of ocean water. The steps of the experiment are listed below.

Fill a rectangular baking glass dish with water.

Place a plastic bag with ice in the water near the left edge of the dish.

Place a lighted lamp near the left edge of the dish so that its light falls directly on the plastic bag.

Put a few drops of ink in the water.

The student did not observe any circulation of ink in the water as expected because the experiment had a flaw. Which of these statements best describes the flaw in the experiment? (2 points)

Not enough ink was added.

Not enough water was taken.

The dish was too small for the experiment.

The lamp and the ice bag were at the same place.

6 0
3 years ago
Hi I m from India plz follow me and I will follow u​
erma4kov [3.2K]

Answer:

pok

Explanation:

4 0
3 years ago
Read 2 more answers
_________ are the special effects that you see when one slide changes to another in slide show view​
lisabon 2012 [21]

Answer:

Transition effects

Explanation:

Transition effects are the special effects you see when one slide changes to another in slide show view.

8 0
3 years ago
Other questions:
  • Smartart and shapes are useful tools because they allow you to
    10·1 answer
  • Universal Containers is setting up an external Business Intelligence (BI) system and wants to extract 1,000,000 Contact records.
    11·1 answer
  • Write a program that does the following: • Alphabetizes a list of small (non-capital) letters. For consistency, make the string
    14·1 answer
  • In windows, a(n) ________ follows the file name and a period and indicates the file type.
    9·1 answer
  • Which of the following statements is false? a. InputStream and OutputStream are abstract classes for performing byte-based I/O.
    7·1 answer
  • Which screen should be open to customize or personalize a desktop background?
    15·2 answers
  • 10010 - 1011 binary subtraction​
    5·1 answer
  • Girls question <br> who wants to go out ;p
    11·2 answers
  • 9. Lael wants to determine several totals and averages for active students. In cell Q8, enter a formula using the COUNTIF functi
    9·1 answer
  • Debra tracks her business finances in a spreadsheet. She wants to figure out how much she could increase profits if she raises p
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!