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
Debug the code in the main method of this class, which is intended to initialize an array named arr to hold 3 ints, fill this wi
pentagon [3]

Answer:

import java.util.Scanner;

public class U6_L1_Activity_One{

 public static void main(String[] args){

   Scanner scan = new Scanner(System.in);

   int[] arr = new int[4];

   arr[1] = scan.nextInt();

   arr[2] = scan.nextInt();

   arr[3] = scan.nextInt();

   System.out.println("Contents: " + arr[1] + " " + arr[2] + " " + arr[3]);

   int Sum = (1 + 2 + 3);

   System.out.println("Sum: " + Sum);

 }

}

Explanation:

5 0
3 years ago
There is a population of owls in a forest. In one year there are 20 new owls born and 10 owls die. In this same year, 5 owls ent
Simora [160]

Answer:

The owls population increased by 13 in one year

Explanation:

The given data on the owl population are as follows;

The number of new owls born = 20 (positive increase in population)

The number of owls that die = 10 (negative decrease in population)

The number of owls that enter the forest = 5 (positive increase in population)

The number of owls that left the forest = 2 (negative decrease in population)

Let 'w' represent the number of new owls born, let 'x' represent the number of  owls that die, let 'y' represent the number of owls that enter the forest and let 'z' represent the number of owls that left the forest, we get;

The change in population, ΔP = w - x + y - z

By plugging in the values, we get;

ΔP = 20 - 10 + 5 - 2 = 13

The change in the population of owls in one year is an increase in 13 owls.

4 0
3 years ago
____ data exist in a format that does not lend itself to processing that yields information.
Nastasia [14]
The word that goes in the blank is "unstructured."
4 0
4 years ago
Kai is a software engineer who started his own IT consulting firm. His friend, Catalina, is the owner of a store that sells offi
vaieri [72.5K]

Answer:

Bartering is the correct answer.

Explanation:

Kai is the engineer that setup his company of IT and his friend who sells the goods for his company. Then he decided to develop a software of the stock management for his friend's store for this his friend gives the required office goods and equipment for his company. So, the bartering is best suited for the following statement.

8 0
4 years ago
Read 2 more answers
Types of motherboard​
Arada [10]

Answer:

Types of Motherboard

Explanation:

Motherboards are present in Desktop, Laptop, Tablet, and Smartphone and the components and functionalities are the same. But the size of the components and the way they are accommodated on the board varies due to space availability. In desktops, most of the components are fitted inside the sockets provided on the board and it is easy to replace each of them separately, whereas in Laptops/Smartphones some components are soldered on the board, hence it is difficult to replace/upgrade.

Though different motherboards have varying capabilities, limitations, features, Physical size/shapes (form factor), they are identified/grouped/categorized mostly by their form factors. Each manufacturer has come out with its form factor to suit the design of computers. Motherboard manufactured to suit IBM and its compatible computers fit into other case sizes as well. Motherboards built using ATX form factors were used in most of the computers manufactured in 2005 including IBM and Apple.

6 0
3 years ago
Other questions:
  • What is the purpose of a Program Epic?
    7·2 answers
  • Normal or random variations that are considered part of operating the system at its current capability are ______: ​ a. systemic
    7·1 answer
  • Compare the specialized and statistical functions in excel
    10·1 answer
  • Who are the founders of Microsoft?
    5·1 answer
  • When someone makes a bad or immoral decision because a group of their friends is also doing it, it is called:
    10·1 answer
  • The Blue Screen of death is not an common error, and it is highly likely that you have encountered and fixed several already. Di
    13·1 answer
  • 14. Which of the following statements is true? A. The most secure email message authenticity and confidentiality isprovided by s
    11·1 answer
  • The third generation of computers was marked by the introduction of ____.
    8·1 answer
  • If your tired but still need to proofread your document,what should you do?
    15·2 answers
  • All languages require the code which is simply a word that means _____.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!