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
Universal Containers (UC) has a great user interface for their Customer Community Knowledge Base. UC has multiple Communities an
IrinaK [193]

Answer:D

Explanation:

Recreate the knowledge base page in all communities.

3 0
3 years ago
Which formula uses relative cell references? $A$10/100 5*10+20 F18+F19/2 $B$5+30
Mandarinka [93]

The formula that uses relative cell references is F18+F19/2.

A relative cell reference will adjust as a formula is copied because it is actually working by calculating what the formula is in relation to the cell where the formula is. For example, if you copied this formula down one row it would adjust to F19+F20/2. This is opposite of an absolute cell reference like you see in the first example. The cell will always reference cell A10, regardless of where it is copied to.

8 0
3 years ago
Project management software helps you develop a ______________, which serves as a basis for creating Gantt charts, assigning res
meriva

Answer:

Work breakdown structure.  

Explanation:

The Work breakdown structure is used in project management which divided the project into smaller parts in software development. When the project is divided into the smaller parts it is distributed that part individually in the member of the project.

The main advantage of  Work breakdown structure when it is divided into smaller parts it is easy to maintain and project work in a very efficient manner also the development of the project in a very fast manner.

4 0
3 years ago
write a python function that takes the largest and smallest numbers in a list, and swap them (without using min() or max() )
Akimi4 [234]

Answer:

def SwapMinMax ( myList ):

   myList.sort()

   myList[0], myList[len(myList)-1] = myList[len(myList)-1], myList[0]

   return myList

   

Explanation:

By sorting the list, you ensure the smallest element will be in the initial position in the list and the largest element will be in the final position of the list.

Using the len method on the list, we can get the length of the list, and we need to subtract 1 to get the maximum element index of the list.  Then we simply swap index 0 and the maximum index of the list.

Finally, we return the new sorted list that has swapped the positions of the lowest and highest element values.

Cheers.

8 0
3 years ago
Which of the following operation is not performed by a mouse​
Stolb23 [73]

Explanation:

didn't evaluation into question

4 0
4 years ago
Other questions:
  • What is the special feature of the view side by side command?
    11·2 answers
  • What will the following code display? #include using namespace std; void doSomething(int); int main() { int x{2}; cout &lt;&lt;
    9·1 answer
  • Using Word, Maureen is writing an outline of a presentation she plans to give to her company. She will be showing a video during
    12·2 answers
  • The body element is where you provide browsers with information about the document
    12·1 answer
  • Which key temporarily activates the Hand tool?​
    6·1 answer
  • which statement describe “Hackers”? | A. all have the same motive | B. break into other people’s computers | C. may legally brea
    14·1 answer
  • MyProgramming Lab
    5·1 answer
  • What is a variable in programming?
    10·1 answer
  • _____is used to organize and modify the properties of the current selection.
    6·1 answer
  • List and describe with details at least three approaches to selecting processes from priority-based multi-level queues.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!