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
steposvetlana [31]
3 years ago
13

Write an if/else statement that compares the double variable pH with 7.0 and makes the following assignments to the int variable

s neutral, base, and acid: 0,0,1 if pH is less than 7 0,1,0 if pH is greater than 7 1,0,0 if pH is equal to 7 History:
Computers and Technology
2 answers:
levacccp [35]3 years ago
4 0

Answer:

if (pH<7.0){

          neutral=0;

          base=0;

          acid=1;

      }

      else if (pH>7.0){

          neutral=0;

          base=1;

          acid=0;

      }

      else if (pH==7.0){

          neutral=1;

          base=0;

          acid=0;

      }

Explanation:

As required by the question, if and else statements have been used to test the value of the pH and assign the apropriate values to the variables neutral, base and acid.

The code snippet below can be used to prompt the user to enter values for pH

<em>import java.util.Scanner;</em>

<em>public class pHTest {</em>

<em>   public static void main(String[] args) {</em>

<em>      Scanner scr = new Scanner(System.in);</em>

<em>       System.out.println("Enter a value for the pH");</em>

<em>       int neutral, base, acid;</em>

<em>       double pH = scr.nextDouble();</em>

<em> if (pH<7.0){</em>

<em>           neutral=0;</em>

<em>           base=0;</em>

<em>           acid=1;</em>

<em>       }</em>

<em>       else if (pH>7.0){</em>

<em>           neutral=0;</em>

<em>           base=1;</em>

<em>           acid=0;</em>

<em>       }</em>

<em>       else if (pH==7.0){</em>

<em>           neutral=1;</em>

<em>           base=0;</em>

<em>           acid=0;</em>

<em>       }</em>

<em>} }</em>

san4es73 [151]3 years ago
3 0

Answer:

Their answeres choices

Explanation:

You might be interested in
Selah infects the ads on a website that users from her target company frequently visit with malware as part of her penetration t
ValentinkaMS [17]

Selah infects the ads on a website with a technique called the Watering hole attacks.

<h3> What is Watering hole attacks?</h3>

The  Watering hole attacks is known to be a form of attack that depends on compromising or infecting a website that has or that targeted users who are known to often frequently visit.

So, Selah infects the ads on a website with a technique called the Watering hole attacks.

Learn more about malware from

brainly.com/question/399317

#SPJ1

8 0
1 year ago
Determine the factors using computer failures and defects​
ladessa [460]

Answer:

Voltage spike – This is a momentary change in the supply of electric power. It’s important to remember that the size of the transient can range from just milliseconds to longer periods of time. Even a small power glitch can damage a computer and corrupt data. If the screen goes blank during a thunderstorm, it’s likely that a voltage spike is responsible.

Circuit board fails with no visible indication of damage – This is the typical scenario: A computer goes down. A defective circuit board is suspected of the fault, but an inspection reveals no signs of physical damage. A replacement board is installed and operation resumes.

Failure to load software upgrades – Computer software often comes with various bugs, or vulnerabilities. These are simply programming mistakes, but they can make the software susceptible to viruses and glitches. When an error is discovered, the software designer sends out a “patch” that requires downloading and rebooting. Failing to upgrade the software by running the patch can lead to corruption of data.

Failure to keep virus protection up to date – There are several malware protection packages available for computer rooms or data centers. Once installed, the subscription must be maintained. One telltale sign of a malware infected computer is slow data processing.

Inadequate cooling – Computers produce heat, and the more data they process, the more heat must be eliminated. Servers, the “brains” of computers, fail under excess heat, so adequate cooling is essential.

Environment – If a computer room has a dedicated cooling system, there may be an opportunity to closely control the heat. If the cooling is shared with other equipment or the space contains offices, we often face a more challenging task. People have comfort needs different to those of computers.

Loss of Power, PDU fails – Power Distribution Units (PDU’s) are similar to power bars in homes and offices. They distribute power to different components in a computer room, and are usually located next to the server racks. PDU’s suffer a range of problems. Receptacles wear out and can be the sources of bad contacts, and moisture can lead to corrosion.

UPS batteries – Uninterruptible Power Supply (UPS) batteries are found in computer rooms. Most often, they are used to provide continuous power for a limited time, during an outage. Depending on how it’s used and the design of the battery, the life span can be as short as 4-5 years for what is considered a “10 year life” battery. Elevated room temperatures will shorten the life of any battery. Even a small facility such as a dentist office uses UPS batteries.

Transfer switch battery defective – This can be an indication that the site lacks an effective battery maintenance program. It can also be a sign that the transfer switch is “frozen” in position. Preventive maintenance could help avoid a breakdown.

Failure of standby power to synchronize (come on line) – When electric power from the grid disappears, standby power takes over in two different ways. In a small computer room, the focus is on turning computers off in a controlled manner. A fully charged UPS will provide power for 10-15 minutes to allow a computer to save its data and turn off. In a larger facility, it’s the matter of keeping cooling and power going long enough to give the standby generator an opportunity to “synchronize,” to get up to a rate of speed sufficient to power the infrastructure and continue data processing.

Diesel fuel contaminated – Most medium to large facilities have generators powered by diesel fuel, which can become contaminated and useless when a power outage occurs. Water is usually the culprit. Regular fuel testing is necessary to avoid contamination.

Storage defective – Data is stored on magnetic disks or tape. Both can be damaged during normal operation, so it’s a good practice to back up stored data on a regular basis. Backing up means creating a spare data storage. Failure of a tape or disk drive is often, but not always, proceeded by noise. Opening the unit to attempt data restoration is better left to a professional.

Sprinkler system turns on above the servers – Where a data room is protected by a water sprinkler system, a small spill can damage the electronic components. This is particularly true in cases where sprinkler heads are located directly above the servers.

Computers are crucial to business today, but there are so many things that can cause them to fail. By addressing the above common culprits, you could help reduce the overall risk of your computer systems failing.

Explantion: I hope this helps!!!!! :)

4 0
2 years ago
Internal memory is synonymous with which memory
soldi70 [24.7K]

Answer:

Main Memory (RAM)

Explanation:

This is the memory which is directly accessible to the CPU. It can be called Main Memory, Prime Memory or simply 'Memory'

5 0
3 years ago
Read 2 more answers
What is the system that consists of nonproprietary hardware and software based on publicly known standards that allow third part
il63 [147K]

Answer:

Open systems

Explanation:

Open systems are very different from Open Source applications or software, it should not be confused.

Open systems work with the blend of open software standards, portability, and interoperability. Computer systems that interoperate among multiple standards and vendors to ensure that computer resources (hardware and software) are not allotted to a particular vendor. Such computer systems are considered as open systems.

For instance, computer systems that run a Microsoft Windows OS can be considered as an Open system. This is because of their capability to run different versions of the Microsoft Windows OS on that particular computer system. More clearly, A computer with Windows 10 OS, can be used to install Windows 8 OS without any issue. That same computer system can run the Windows 7 OS. This makes the computer system and open system.

5 0
2 years ago
Explain in brief terms some of the technology and developments that were important in the history and development of the Interne
igomit [66]

Answer: The Internet started in the 1960s as a way for government researchers to share information. ... This eventually led to the formation of the ARPANET (Advanced Research Projects Agency Network), the network that ultimately evolved into what we now know as the Internet.

Have a nice day ahead :)

7 0
2 years ago
Other questions:
  • 3) Write a program named Full_XmasTree using a nested for loop that will generate the exact output. This program MUST use (ONLY)
    6·1 answer
  • You just read an msds for acetic acid. based on what you read, what type of information is included in an msds sheet? record you
    7·1 answer
  • An iPad Is An Example Of Which Type Of Computer?
    11·2 answers
  • Which ipv6 router message is sent via multicast with a scope of link-local with the expectation that all local routers will iden
    5·1 answer
  • Choose a developing country and give 3 reasons why it is a developing country ​
    15·1 answer
  • "what type of index has an index key value that points to a data row, which contains the key value? "
    9·1 answer
  • What resources can be shared over a computer network?
    12·2 answers
  • Strobe lights can become more yellow as they age true or false
    8·1 answer
  • Which tab should be selected to add a hyperlink within a cell? Home tab Review tab Insert tab Formula tab
    12·2 answers
  • Privacy, anonymity, and freedom of expression are all interrelated.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!