Question: USE C LANGUAGE***** Write a program that simulates an AC/Heater control system. The program reads the room temperature and uses the conditions shown in Fig.
USE C LANGUAGE*****
Write a program that simulates an AC/Heater control system. The program reads the room temperature and uses the conditions shown in Fig. 2 to determine the AC and heater states. The program displays Temp, AC state, and Heater state. Note that the desired temp is fixed at 72.5 F. Assign the states with integer numbers, e.g., 3- high, 2- med, 1- low, or 0- off. Temperature Sensor Desired Temp = 72.5 Heater Desired Temp AC Fig. 1 States Heater AC High 3 Med 2 Low 1 Off -0 40 50 60 80 90Temp (F) Fig. 2-2 Program Flow: 1. Enter room temperature 2. Use Fig. 2 to get the state of the heater (3- high, 2- med, 1- low, or 0- off) and AC (3 - high, 2- med 1- low, or 0- off) Display the room temperature, AC state, and Heater state 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
