Write multiway if-else statements for which the output is “Alarm: Boiler Pressure: TOO HIGH” if the value of the variable boiler_pressure is greater than 1000 (psi), and the output is “Boiler Pressure: TOO LOW” if the value of boiler_pressure is below 100(psi), otherwise the output is “Boiler Pressure: within normal limits.”
What will be an ideal response?
if (boiler_pressure > 1000)
cout << “Boiler Pressure: TOO LOW\n”;
else if (boiler_pressure < 100)
cout << “Boiler Pressure: TOO LOW\n”;
else
cout << “Boiler Pressure: within normal limits.\n”;
Computer Science & Information Technology
You might also like to view...
A(n) ________ database contains data that is divided into several tables that can be related to each other by a common field
Fill in the blank(s) with correct word
Computer Science & Information Technology
The position of the lines of a paragraph relative to the page margins is the ________
A) indent B) line spacing C) orientation D) page layout
Computer Science & Information Technology