Question: Create a C code which simulates the operation of a refrigeration chamber. The code should ask the user to input if the chamber is at

Create a C code which simulates the operation of a refrigeration chamber. The code should ask the user to input if the chamber is at a temperature (variable T1) above 0degC-0 for false and 1 for true; if the door of the chamber is closed (variable D)-0 for false and 1 for true; and if there are products inside the chamber (variable P)-0 for false and 1 for true:
If all the above are true then the code should start the refrigeration system for the chamber output a message saying "Refrigeration started!"
If there are no products inside the chamber, then output a message saying "Refrigeration not started - no products inside chamber!"
If there are products inside the chamber and T1 is above 0 degC , and the door is open, then output the message: "Refrigeration started - high inefficiency, please close door as soon as possible!"
If there are products inside the chamber and T1 is below 0 degC, ask the user if T1 is below -8 degC -0 for false and 1 for true. If true, then output a message "Refrigeration not started - chamber is cold!"; else if false and:
Door is closed, start refrigeration in low cycle mode and output message "Refrigeration started in low cycle mode!"
Door is open, start refrigeration in low cycle mode and output message "Refrigeration started in low cycle mode - high inefficiency, please close door as soon as possible!"
Organize your code so that you minimize the number of if conditions being run.
Create a C code which simulates the operation of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!