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
umka2103 [35]
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 int variable

s neutral, base, and acid: a. 0,0,1 if pH is less than 7 b. 0,1,0 if pH is greater than 7 c. 1,0,0 if pH is equal to 7
Computers and Technology
1 answer:
Brilliant_brown [7]3 years ago
4 0

Answer:

int main()

{

   double pH;

   int neutral;

   int base;

   int acid;

   cout<<"Enter a pH Value";

   cin>> pH;

   if(pH<7.0){

       neutral =0;

       base=0;

       acid= 1;

   }

   else if (pH=7.0){

       neutral =1;

       base=0;

       acid= 0;

   }

   else{

       neutral =0;

       base=1;

       acid= 0;

   }

   cout <<"The neutral, Base and Acid Values are: "<<neutral<<","<<base<<","<<acid<<" Respectively"<<endl;

   return 0;

}

Explanation:

Using multiple if/elseif/else statement the following problem is solved with C++

You might be interested in
Class secretType { public: static int count; static int z; secretType(); secretType(int a); void print(); static void incrementY
ANEK [815]

Answer:

a. secretType mySecret(9)

Explanation:

6 0
3 years ago
After submitting a résumé by mail, how long should you wait before following up with an employer? a. 1 day b. 2-3 days c. 1 week
inn [45]
C is the correct answer. One week is an appropriate amount of time to wait when mailing a resum<span>é</span><span>, because it takes at least a couple of days for mail to arrive. However, you still want a decisive response, so two weeks is probably a little too long.</span>
7 0
3 years ago
A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-lif
Elena L [17]

Answer:

// here is code in java.

import java.util.*;

class Solution

{

// main method of class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // declare variable

         double caffeine;

    // scanner object to read input from user

       Scanner scr=new Scanner(System.in);

       System.out.print("Enter the initial amount of caffeine:");

        // read the initial amount of caffeine

           caffeine=scr.nextDouble();

          // calculate amount of caffeine after 6,12,18 hours

          for(int i=1;i<=3;i++)

          {

               System.out.println("After "+ i*6+" hours:"+(caffeine/2)+" mg");

               // update the caffeine after every 6 hours

               caffeine=caffeine/2;

          }

                 

   }catch(Exception ex){

       return;}

}

}

Explanation:

Create a variable "caffeine" to store the initial amount of caffeine given by user. Run a loop for three time, it will calculate the amount of caffeine left after every 6 hours.First it will give the amount of caffeine left after 6 hours, then caffeine left after 12 hours and in last caffeine after 18 hours.

Output:

Enter the initial amount of caffeine:100

After6 hours:50.0 mg

After12 hours:25.0 mg

After18 hours:12.5 mg

8 0
4 years ago
You are building a gaming computer and you want to install a dedicated graphics card that has a fast GPU and 4GB of memory on bo
Lilit [14]

Answer: PCI- Express?

Explanation:

if that is an answer....

7 0
4 years ago
Numbering exception conditions, which often uses hierarchical numbering, in a fully developed use case description is helpful to
Vesna [10]

Answer:

a) tie the exception condition to a processing step

Explanation:

Numbering exception conditions, in a fully developed use case description is helpful to tie the exception condition to a processing step

The fully developed use case description is useful for the documentation of the context, purpose, description, conditions, and workflow of each use case. Activity diagrams give a graphical image of the use case workflow and serve the purpose of illustrating the alternative paths through a business process.

7 0
4 years ago
Other questions:
  • What the address for dns server that the eorkstation will use?
    10·1 answer
  • Most internet connections use what transmission
    13·2 answers
  • Who needs to be involved when assembling business solutions that include hardware and software?
    11·2 answers
  • Write a program that will ask the user to input a phrase (multiple word sentence), and an integer value. A static function will
    14·1 answer
  • Which of the actions below will not create more room on your hard drive?
    13·1 answer
  • 1. Why is it important for IT technicians to keep documentation on computers for which they are
    13·1 answer
  • Which of the following is an example of metadata about a webpage?
    7·2 answers
  • I need help 50 points and brainiest if you answer
    10·2 answers
  • 3.<br>What is the meaning of *.VBP.<br>​
    6·2 answers
  • Which of the following is true about stateless applications?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!