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
slamgirl [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 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:
Neko [114]3 years ago
8 0

Answer:

public class PhTester {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("What is the pH Value");

       double pH = in.nextDouble();

       boolean neutral,base,acid;

       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;

       }

   }

}

Explanation:

A complete java code is given above:

1. the variables neutral, acid, base are declared as booleans

2. Scanner class is used to request the user to enter a value for the pH

3. If/else statements are used to assign values to the variables

You might be interested in
_______ allows you to specify how a photo is positioned in the text of your document.
Lisa [10]
<span>The answer your looking for is Wrap text!!</span>
5 0
3 years ago
Integration Management, one of the 10 PMBOK Guide Knowledge Areas, represents the processes and activities to identify, define,
-Dominant- [34]

Answer:

The answer is "True".

Explanation:

Integration control is a system selection, which is important to ensure the proper coordination of the different components of the programs. Analogies between conflicting goals and solutions must be made to meet or surpass the needs and wishes of participant groups. This mechanisms use events for identifying, defining, combining, unifying and coordinating software development procedures and events, that's why the given statement is true.

6 0
4 years ago
When replacing a thermostat or water pump, coolant drained from the cooling system should be ________.
Alchen [17]

Answer:

Explanation:

Disposed of in a contained way/recycled.

5 0
3 years ago
GIVING BRAINLIEST What does output allow a computer to do? Display information Receive information Do complex math problems Do m
kumpel [21]
The answer is display information
4 0
3 years ago
Read 2 more answers
In a computer-controlled greenhouse, a temperature sensor and a window motor are connected to the computer.
GrogVix [38]
Hope this helps solve it

8 0
3 years ago
Other questions:
  • Which part of the os provides users and applications with an interface to manipulate files?
    8·1 answer
  • In the game of economics, which player has the role of providing goods and services
    10·1 answer
  • Which of the following code is correct? I: print("Programming is fun") print("Python") print("Computer Science") II: print("Prog
    11·1 answer
  • What command would you use to add a file to an e-mail message?
    15·2 answers
  • Write programs in python to display “Valid Voter”. (condition : age of person should be
    15·1 answer
  • Write two example use of relationships ICT
    11·1 answer
  • Which statement assigns the value 140 to the variable streetNumber in Python?
    13·1 answer
  • When you login to your blogging account. The first screen with all controls, tools and functions is called .... Select one: a. D
    10·1 answer
  • Hey everyone please let my friends answer please?????? .
    12·2 answers
  • How to create create a database in mysql using clv files
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!