Display a message reporting the acidity of a liquid based on the input color of the liquid
What will be an ideal response?
```
int main()
{
char color; // first letter of color of liquid
cout << endl << "Enter the color of the liquid flowing into the vat"
<< endl << "(R)ed, (B)lue, (P)urple, or (W)hite/clear=> ";
cin << color;
switch (color){
case 'R':
case 'r':
cout << "Acidic material";
break;
case 'B':
case 'b':
cout << "Basic material";
break;
case 'P':
case 'p';:
cout << "Neutral material";
break;
case 'W':
case 'w':
cout << "No flow";
break;
default:
cout << "Incorrect input";
}
cout << endl << endl;
return 0;
}
```
You might also like to view...
Of the several problem solving tools introduced, which provides the BEST view of the pseudo code
a. Flowchart b. Algorithm c. Problem Analysis Chart d. IPO Chart
Which of the following statements is false?
a. Each class can define a constructor for custom object initialization. b. A constructor is a special member function that must have the same name as the class. c. C++ requires a constructor call for every object that’s created. d. A constructor cannot specify parameters.