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
Jerome falls sick after eating a burger at a restaurant. After a visit to the doctor, he finds out he has a foodborne illness. O
babunello [35]

Answer: food poisning

Explanation:

either the food wasnt

cooked properly or the food was out of date and went bad

3 0
3 years ago
Movie Hidden Figures
Setler79 [48]

Answer:

D: 97

Explanation:

i watched this movie 3 times

4 0
3 years ago
Elements such as page parts and calendars are easily inserted by navigating to the _____ grouping. Building Blocks Illustrations
yaroslaw [1]

Answer:

Building Blocks

Explanation:

When referring to the Publisher Application the navigation feature that allows you to do this is the Building Blocks feature. Like mentioned in the question this feature allows you to choose from and insert a predefined set of calendars for insertion into a publication as well as insert a variety of other page parts to better customize the feel of the publication.

6 0
3 years ago
Consider a system consisting of m resources of the same type, being shared by n processes. Resources can be requested and releas
Mama L [17]

Answer:

Explanation:

The system will be deadlock free if the below two conditions holds :

Proof below:

Suppose N = Summation of all Need(i), A = Addition of all Allocation(i), M = Addition of all Max(i). Use contradiction to prove.

Suppose this system isn't deadlock free. If a deadlock state exists, then A = m due to the fact that there's only one kind of resource and resources can be requested and released only one at a time.

Condition B, N + A equals M < m + n. Equals N + m < m + n. And we get N < n. It means that at least one process i that Need(i) = 0.

Condition A, Pi can let out at least 1 resource. So there will be n-1 processes sharing m resources now, Condition a and b still hold. In respect to the argument, No process will wait forever or permanently, so there's no deadlock.

5 0
3 years ago
To what health hazard are people working in offices most likely to be exposed.
Andrei [34K]

Answer:

Sickness

Explanation:

6 0
4 years ago
Other questions:
  • Which best compares and contrasts visual and performing arts? Both careers use communication skills; however, people involved in
    15·2 answers
  • Which of the following criteria would not make a person eligible to receive medicare benefits?Which of the following criteria wo
    12·2 answers
  • ________ and wpa are wireless security protocols which use encryption to secure wi_fi networks.
    12·1 answer
  • g Create a program that reads a list of states from an input file, puts them in order, and displays the sorted list to the user.
    15·1 answer
  • John would like to move from the suburbs into the city, but the rent in the city is very high. John has found an apartment he re
    13·1 answer
  • Advancements in technology that might be helpful for individuals who need accommodations to perform computer tasks include _____
    15·2 answers
  • The term computer ________ is used to describe someone who is familiar enough with computers to understand their capabilities an
    12·1 answer
  • If Asa changes the text to bold, he has changed the style. True False
    8·2 answers
  • Write a function named reverse_list that takes as a parameter a list and and reverses the order of the elements in that list. It
    12·1 answer
  • Name the character encoding standard that enables up to 128 different commonly used characters,
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!