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...

What is resizable layout?

What will be an ideal response?

Computer Science & Information Technology

Examples of user data include all of the following EXCEPT

A) Temp files B) User profiles C) Program files D) User passwords

Computer Science & Information Technology

In ____ computer science, researchers study the logical and mathematical properties of problems and their solutions.

A. theoretical B. scientific C. practical D. logical

Computer Science & Information Technology

The ____ option in the ca command is used to generate the CRL.

A. -gencrl B. -crl C. -revoke D. -crlcert

Computer Science & Information Technology