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
pychu [463]
3 years ago
6

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

es neutral, base, and acid: a. false, false, true if pH is less than 7 b. false, true, false if pH is greater than 7 c. true, false, false if pH is equal to 7.
Computers and Technology
1 answer:
Volgvan3 years ago
6 0

Answer

       if (pH<7.0){

           neutral=false;

           base=false;

           acid=true;

       }

       else if (pH>7.0){

           neutral=false;

           base=true;

           acid=false;

       }

       else if (pH==7.0){

           neutral=true;

           base=false;

           acid=false;

       }

A complete java program that prompts a user for the pH value is provided in the explanation section

Explanation:

import java.util.Scanner;

public class ANot {

   public static void main(String[] args) {

      Scanner in = new Scanner(System.in);

       System.out.println("Enter a value for the pH");

       boolean neutral, base, acid;

       double pH = in.nextDouble();

       if (pH<7.0){

           neutral=false;

           base=false;

           acid=true;

       }

       else if (pH>7.0){

           neutral=false;

           base=true;

           acid=false;

       }

       else if (pH==7.0){

           neutral=true;

           base=false;

           acid=false;

       }

}

}

You might be interested in
Rachel typed two paragraphs and then realized she was in the wrong document. What steps should Rachel follow to quickly move the
igomit [66]
It would be A. I hope that this helps!
6 0
3 years ago
Read 2 more answers
The purpose of an Internet _____ is to receive packets and send them along towards their final destination.
Bumek [7]

The tool that receives packets and send them along towards their final destination is; Internet Server

<h3>Internet Servers</h3>

We are told that the tool is used to receive packets and send them along towards their final destination.

  • Now, the tool is an internet server because internet servers are softwares and hardwares that make use of HTTP and other protocols to respond to client requests that are made over the World Wide Web.

Now, the main job of an internet server is to display website content through storing, processing and delivering webpages to the final destination.

Read more about internet server at; brainly.com/question/20602197

7 0
2 years ago
100 POINTS!!! PLEASE HELP ME
Ronch [10]

Answer:

1 web

2- invintory

3- spreadsheet

4-survey

Explanation:

hope it helps

5 0
2 years ago
Read 2 more answers
Please help. 10 points
pickupchik [31]

Answer:

God Is Good He Will Always Help You He Is Good And Always Good!!

If God Is For Us Who Can Be Against us?? Romans 8:31

Explanation:

6 0
2 years ago
Read 2 more answers
Describe at least one reason why transitioning from the Cisco implementation of STP to the Cisco implementation of RSTP is seaml
kherson [118]

Answer:

STP mainly uses 5 states in a network, in which some states are replaced in RSTP which improves the time efficiency.

Explanation:

STP mainly uses five states i.e.  Learning, Listening, Blocking, Disabling and Forwarding to overcome the problem of collision in a network.  

RSTP replaced the three states of STP i.e listening, learning, and blocking by Discarding, which results in the time efficiency as compared to STP.  

As STP takes minutes to complete the network inter connectivity, RSTP completes it in seconds.

This is one of the main reason why an administrator want to change to RSTP.

6 0
3 years ago
Other questions:
  • Write a Raptor program that will generate a random number between 1 and 100; do not display the randomly generated number. Let t
    8·2 answers
  • What might be one reason why a stock becomes more valuable over time
    5·1 answer
  • Different units of CPU ?
    12·1 answer
  • Is there a relationship between cybercrime and traditional crime?
    6·1 answer
  • 1. Some of the music in the 1960s was used to protest social and political issues. Is music still used as a form of protest? Why
    13·1 answer
  • What is the purpose of the operating system's processor management function?
    14·1 answer
  • Copyright applies to work at the time it was produced, written, and developed. True or False?
    10·2 answers
  • What is the importance of effectiveness in communication?
    14·1 answer
  • What will the "background-color" of the "topButton" be when the program is finished running?
    10·1 answer
  • Write a while loop that continues to increment uservalue by 5 as long as uservalue is less than 0.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!