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]
3 years ago
9

Use the arr field and mystery () method below.

Computers and Technology
1 answer:
kolezko [41]3 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
What are several different types of software, which sit in the middle of and provide connectivity between two or more software a
brilliants [131]

Answer:

The answer to the given question is the option "a".

Explanation:

In this question, the answer is "middleware" software because this software works between the operating system and the applications that provide connectivity to two or more software applications. for example database, application server, etc and other choices that are not correct can be described as:

  • In option b, The integration middle wear represents the software of the system. It does not coordinate between operating and application software.
  • In option c, It is used to manage the data and the information for the process.
  • In option d, It includes the hardware, software and the networks. In this hardware and software link for use software.

That's why the answer to this question is the option "a".

6 0
3 years ago
How do you change your password on this? This isn’t really a “Question” but....
MissTica
You go to edit profile and press the change password button.  click on profile pic
5 0
4 years ago
Read 2 more answers
(e) The vending machine stores the quantity of items available in a database table called ITEMS
zimovet [89]

Answer:

a1,a2,62,

please mark brainliest

Explanation:

8 0
2 years ago
To insert text from a separate file into your word document
Rainbow [258]
Indent or copy and paste

7 0
3 years ago
Define the HTML tags needed to write CSS rule, inside of those HTML tags define a CSS rule using internal CSS requirements for c
Len [333]

You can use internal style definitions with the <style> tag:

<style>

body {

  color: red;

  font-style: italic;

  font-size: 12pt;

  font-family: Arial;

  font-weight: bold;

}

</style>

This gives you red italic text of 12pt using the Arial font.

7 0
3 years ago
Other questions:
  • What division monitors the sale and registration of vehicles and vessels within the state?
    15·1 answer
  • Melissa and Sue want to distribute a document to be discussed at a meeting starting in about thirty minutes. People will be atte
    14·1 answer
  • You are reviewing the style sheet code written by a colleague and notice several rules that are enclosed between the /* and */ c
    12·1 answer
  • Who needs to be involved when assembling business solutions that include hardware and software?
    11·2 answers
  • discuss the advantages and disadvantages that Excel has in helping navigate databases, big data, and data analytics.
    11·1 answer
  • State The function<br>of floppy disk​
    10·1 answer
  • Which of the following statements is true?
    6·2 answers
  • Generate a row vector b=[1 2 3 4 5 6 7 8 9 10] using linspace function, give the commands and show print-screen of the result.
    11·1 answer
  • When Google created its China-based search engine www..cn, they did not foresee eventually abandoning it because of censorship i
    12·1 answer
  • Which of the following is a negative effect of the rise in agricultural technology following World War II?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!