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 T above degC for false and for true; if the door of the chamber is closed variable D for false and for true; and if there are products inside the chamber variable P for false and 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 T is above 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 T is below degC, ask the user if T is below degC for false and 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
