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
End users have complained that when they click a link on your company's Website, the wrong client loads. You review the page wit
Ilia_Sergeevich [38]

Answer:

4. A Web server has been specified.

Explanation:

End users have complained that when they click a link on your company's Website, the wrong client loads. You review the page with the suspect link and find the following HTML code:

To begin an FTP session, click the following link:

FTP Session

The problem is that Web server has been specified.

7 0
3 years ago
What is log in and log out?
Brums [2.3K]
Log in is the feature that allows you to access your electronic account in a website, database or other, also a bank account. Your username and password are stored in cookies  (files that websites use and are stored in your browser) for the session. This is true if we talk about websites.

When you're done, you log out from your account, you disconnect. Cookies are cleared (for websites) and you're out.
8 0
3 years ago
Which of the following binary numbers is equivalent to decimal 4?
melomori [17]

Answer:

b so easy

Explanation:

5 0
3 years ago
Read 2 more answers
If a webpage utilizes two css files - style.css and media-queries.css, which should be linked last in the head section?
Dmitry_Shevchenko [17]
Media-queries.css should be linked last, the same as if your media queries were in the same file (always go last)
4 0
3 years ago
Gabrielle would like to purchase a new ____, which would be used to connect the company’s lan and the internet.
IRINA_888 [86]
It would be modem. The modem connects to the internet through their ISP's line via a (usually) coaxial cable. The modem then transfers information to a router, which is used to transfer the information coming from the internet to the rest of the devices on the network, wired, wireless, or both.

Nowadays, though, modems and routers tend to come in a two-in-one, whether it's first-party provided by your ISP, or third-party where you've purchased one. This two-in-one is often just referred to as the router, so this could well be the answer to your question as well.

The reason I stated the above answer, is because a regular router on its own is unable to connect to the internet, it must be receiving internet from somewhere. The two-in-one however would have the coaxial cable to connect to the internet, as well as your usual Ethernet ports and wireless capability.
4 0
3 years ago
Other questions:
  • Help !!!!!
    9·1 answer
  • Why does my Office Computer send packet #1? What device responds by sending back packet #2? What information does my Office Comp
    15·1 answer
  • To save a file so that it can be opened on most computers, select the ____ option.
    10·2 answers
  • _______ is a communications protocol used to send information over the web. HyperText Markup Language (HTML). URL (Uniform Resou
    10·1 answer
  • What happens when two computers have the same IP address?
    13·1 answer
  • Which cloud computing element that gives a service provider the ability to dynamically allocate shared physical resources to mul
    12·1 answer
  • Check My Work Sherri is considering replacing a processor on her laptop. The laptop is running slower than she would like. What
    9·1 answer
  • The term structure, as it relates to programming, refers to the decisions you make to design your program to best meet its objec
    11·1 answer
  • What is the setting an alarm clock output??
    10·1 answer
  • Here is something cool
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!