Consider a greenhouse climate control system with following operations:
“The heater turns ON when the temperature drops below 18°C and remains ON until it reaches 22°C, the cooling fan activates when the temperature exceeds 30°C and stays ON until the temperature falls below 25°C, the ventilation system remains OPEN when the temperature is between 20°C and 28°C (inclusive) and CLOSED otherwise, if humidity drops below 40%, the system triggers a humidifier to increase moisture, if humidity exceeds 70%, the system activates dehumidifiers.”
Based on above system operations, write a C program that asks the user to enter the current temperature ($X$) in °C and humidity ($Y$) in % and displays the system’s status as follows:
Current temperature = X °C Current humidity = Y % Heater status: ON / OFF Cooling fan status: ON / OFF Ventilation System Status: OPEN / CLOSED Humidifier status: ON / OFF Dehumidifier status: ON / OFF
Note: The program must allow the user to run the program indefinitely until users choose to exit.