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
Jason is computer professional who has access to sensitive information. He shares this information with another organization in
Temka [501]

<em>Jason violated the </em><em>confidentiality of information. </em>

<em> </em>

<em>Part of information security is "confidentiality of information" wherein an employee must kept all the information he may acquire when he is working in a company, confidential. When we say confidential, he is not allowed to disclose anything that he may know about company's operation, sensitive information to anybody who is outside the company (like in the example, another organization). Because data that he might disclose may get on hands by company's competitors and it can be used against the company. They might steal ideas and strategies. </em>

4 0
3 years ago
What are the two types of digital water marking?
Otrada [13]
Visible and invisible
3 0
3 years ago
WILL GIVEE BRAINLIEST ANSWER!!!!
Licemer1 [7]

Answer:

People have been ringing the death knell for email on and off for a few years now. But should we be listening?

The latest peal came from French IT company Atos, which declared that it would phase out internal emails by 2013. And for reasons we’ll all recongize: too much time spent dealing with too many emails, of which too few are useful and too many are spam. CEO Thierry Breton said his staff would instead use good old face-to-face communication, as well as instant messaging (IM) and social media tools.

3 0
3 years ago
If I make a Zoom Meeting, would you join it?
boyakko [2]

Most likely, yeah lol.

3 0
4 years ago
Read 2 more answers
Write the interface (.h file) of a class Counter containing: A data member counter of type int. A data member named counterID of
OlgaM077 [116]

Explanation:

See the attached image for The interface (.h file) of a class Counter

8 0
4 years ago
Other questions:
  • Where does the term for a star network describe? A) a network for Department of Defense scientists to share data about the stars
    13·2 answers
  • Sulfur content is measured in
    11·1 answer
  • To under a clip art you must do the following.
    14·1 answer
  • Jenny is working on a laptop computer and notices that the computer is not running very fast. She looks and realizes that the la
    14·1 answer
  • In the list [0, 13, 5.4, "integer"], which element is at index 2?
    11·1 answer
  • Write a program that displays the middle value of three unduplicated input values. Hint: Review the four solutions in the smalle
    10·1 answer
  • Which of the following uses the proper syntax for creating an HTML comment?
    8·1 answer
  • How many answer can you get daily
    7·2 answers
  • Which factor affects reading speed the most?
    9·1 answer
  • Range paramters - for loop<br> question in picture
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!