Help modifying DS18B20 sample code to activate a relay

I would like to have float collector = printTemperature(insideThermometer); not need a separate function to work. I'd like to be able to say: float collector = value of sensor1, but my lack of programming knowledge inhibits this. For what I'm doing it doens't really bother me that much as it's functional. Although it would be nice to know how to do it.

You mean like this?

  float tempC = sensors.getTempC(deviceAddress);

That's the important line of code from the function.