simple code not working together with LED light

I am trying to get my DS18B2O temperature sensor to light up the LED every time the temperature rises about 37.8 C or drops 35 C.
I have the temperature code running correctly by it self as shown below:
#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into pin 2 on the Arduino
#define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices
// (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);

void setup(void)
{
// start serial port
Serial.begin(9600);
Serial.println(“Dallas Temperature IC Control Library Demo”);

// Start up the library
sensors.begin();
}

void loop(void)
{
// call sensors.requestTemperatures() to issue a global temperature
// request to all devices on the bus
Serial.print(" Requesting temperatures…");
sensors.requestTemperatures(); // Send the command to get temperatures
Serial.println(“DONE”);

Serial.print("Temperature for Device 1 is: ");
Serial.print(sensors.getTempCByIndex(0)); // Why “byIndex”?
// You can have more than one IC on the same bus.
// 0 refers to the first IC on the wire

}

I also have the Led light flashing by it self :

int ledPin = 13; // LED connected to digital pin 13

void setup()
{
pinMode(ledPin, OUTPUT); // sets the digital pin as output
}

void loop()
{
digitalWrite(ledPin, HIGH); // sets the LED on
delay(1000); // waits for a second
digitalWrite(ledPin, LOW); // sets the LED off
delay(1000); // waits for a second
}

However, i don’t know how to combine the codes together in order to make the LED light up every time the temperature rises about 37.8 C or drops 35 C.
Thanks in advance

Something like that:

float temp = sensors.getTempCByIndex(0);

if (temp < 35 || temp > 37.8)
    digitalWrite(ledPin, HIGH);
else
    digitalWrite(ledPin, LOW);

Or simplified:

float temp = sensors.getTempCByIndex(0);

digitalWrite( ledPin, (temp < 35 || temp > 37.8) );

Yes but you must declare ‘temp’ as I did (and also add the things related to the LED)

#include <OneWire.h>
#include <DallasTemperature.h>
 
// Data wire is plugged into pin 2 on the Arduino
#define ONE_WIRE_BUS 2
 
// Setup a oneWire instance to communicate with any OneWire devices 
// (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);
 
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);

const uint8_t ledPin = 13;                 // LED connected to digital pin 13 

void setup(void)
{
  pinMode(ledPin, OUTPUT);      // sets the digital pin as output

  // start serial port
  Serial.begin(9600);
  Serial.println("Dallas Temperature IC Control Library Demo");

  // Start up the library
  sensors.begin();
}
 
 
void loop(void)
{
  // call sensors.requestTemperatures() to issue a global temperature
  // request to all devices on the bus
  Serial.print(" Requesting temperatures...");
  sensors.requestTemperatures(); // Send the command to get temperatures
  Serial.println("DONE");

  float temp = sensors.getTempCByIndex(0);

  Serial.print("Temperature for Device 1 is: ");
  Serial.print(temp); 
    // You can have more than one IC on the same bus. 
    // 0 refers to the first IC on the wire

  if (temp < 35 || temp > 37.8)
    digitalWrite(ledPin, HIGH);
  else
    digitalWrite(ledPin, LOW); 
}

And please use the code tags (the # button in the edit box)