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
* 8) Embedded operating systems are specialized software meant only to manage the
Ede4ka [16]

Answer:

True

Explanation:

Embedded operating systems are operating systems which supports hardware which is not a computer and allows the hardware to perform its task.

An example of a device with an embedded operating system is an SD card. The operating system on the card allows the card to be readable by the computer which its is plugged to.

Other examples of hardware with embedded systems are traffic lights, digital televisions, ATMs, point of sale (POS) and digital cameras.

3 0
2 years ago
Help!! Best answer will get Brainliest!!
Eddi Din [679]

Answer:

answer(s):

-set goals

-select a topic

-write down research questions

Hope this helped and sorry for the bold. <3

Explanation:

6 0
2 years ago
Read 2 more answers
An array of strings , names , has been declared and initialized . write the statements needed to determine whether any of the th
OLEGan [10]
#Python

hasempty = False
for name in names:
   if ( not name ):
      hasempty = True
      break  # speed things up
3 0
3 years ago
B. Differentiate Operation System from other software. give me 4-5 sentences pls.
borishaifa [10]

Answer:

it is a

Explanation:

i did the test

8 0
2 years ago
Read 2 more answers
Explain vividly any operating system of your choice stating at least 3 distinguishing features of each version.
rosijanka [135]

Answer:

microsoft windows, macOS, and linux

Explanation:

if you need help let me know

7 0
3 years ago
Read 2 more answers
Other questions:
  • Var cookie = "username=mike2009";
    10·1 answer
  • What font option will elevate part of the text to a higher level and decrease its size? A. Subscript
    8·1 answer
  • Translate the following C++ program to MIPS assembly program. *Please explain each instruction of your code by a comment and sub
    5·1 answer
  • A technician has just installed a video card in a PC. The video card is not working, althoughit was working fine on the test ben
    6·1 answer
  • To maintain her audience's confidence in her, what should kiara not do while delivering her presentation?
    10·1 answer
  • Which weakness of web sites to launch attacks does an sql injection technique exploit?
    15·1 answer
  • write a script that creates and calls a stored procedure named insert_category. first, code a statement that creates a procedure
    10·1 answer
  • An information system is the set of steps that needs to be followed to ensure that software development proceeds in an orderly f
    13·1 answer
  • Describe psychographic differences among the past five generations of Americans that you learned about in this course. What type
    5·1 answer
  • An embedded system describes computing technology that has been enclosed in protective shielding for security reasons. True or f
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!