I need help with the following program. It is to be written in C and will be tes
ID: 3537404 • Letter: I
Question
I need help with the following program. It is to be written in C and will be tested on a Dragon12 plus developmental board. I have a code that will display the temperature on my board, but I have been unsuccessful in modifying it to work with this problem. Any help would be appreciated.
B) Display temperature on the LCD. If temperature is between 27 and 32, LCD must display " Comfort Zone" As soon as temperature goes over 32 degree Celsius, LCD must display " Too hot, decrease the temperature" on the LCD. If temperature goes over 35 degree, all LEDs on the board must start flashing and buzzer on the board must start.
Explanation / Answer
#include<stdio.h>
int main()
{
int n;
printf("enter the temperature:");
scanf("%d",&n);
printf(" ");
if(n>27 && n<32)
printf("comfort zone");
else if(n>32 && n<=35)
printf("Too hot, decrease the temperature");
else if(n>35)
printf("flashing and buzzer on the board must start");
}