If statement thermometer

This is my first ever post and project. I am working on adding an if/else statment to my thermostat. Though I know this is probably a simple issue, I am trying to have some parameters to go off when the sensor reports certain values for my board. by using an if statement I am able to turn on an LED when the sensor reports a value of above 80 degrees F, but i am unable to turn it off when the sensor reports a value below 80 degrees F. Could someone help me shut off the LED. I've tried using a else statement but it wont accept it. Any help would be appreciated; thanks!

const int temperaturePin = 0;

void setup()
{
  Serial.begin(9600);
  pinMode(13,OUTPUT);
}

void loop()
{

  float voltage, degreesC, degreesF;
  voltage = getVoltage(temperaturePin);
  degreesC = (voltage - 0.5) * 100.0;
  degreesF = degreesC * (9.0/5.0) + 32.0;

  Serial.print("voltage: ");
  Serial.print(voltage);
  Serial.print("  deg C: ");
  Serial.print(degreesC);
  Serial.print("  deg F: ");
  Serial.println(degreesF);

  if(degreesF > 80)
    digitalWrite(13,HIGH);
    
  delay(2000);
}

float getVoltage(int pin)
{
  return (analogRead(pin) * 0.004882814);

Look into the "ELSE" statement.

Essentially, if it's not above 80, the ELSE condition will turn off the LED.

I've tried using a else statement but it wont accept it

Post the code you tried.

When you sort out the "if" you'll find it's likely a good idea to leave a few degrees' gap between the off and on, ie not just on > 80 and off <= 80, since then at 80 it will flicker as it changes minutely between 80 and 80.1. That slight gap is known as hysteresis.

  if(degreesF > 80)
{ 
digitalWrite(13,HIGH); 
} else if(degreesF < 78){
digitalWrite(13,LOW);
} else {
Serial.println("In between, just wait a little longer!");
}

How about now?

Thanks for the quick replies guys; It works! with the limits C-F-K wrote it now shuts on and of with the desired parameter temperatures. Glad to get such quick responses