Theomv:
My code is as follows :// 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.println(sensors.getTempCByIndex(1)); // Why "byIndex"? You can have more than one IC on the same bus. 0 refers to the first IC on the wire
Serial.print("Temperature for Device 2 is: ");
Serial.println(sensors.getTempCByIndex(0));
delay(1000);
Temp1=sensors.getTempCByIndex(1); //Store sensor 1 value
Temp2=sensors.getTempCByIndex(0); //Store sensor 2 value
AverageTemp= (Temp1 + Temp2) / 2; //Average value of sensor 1 & sensor 2
Serial.print("Average temp is...");
Serial.println (AverageTemp);
Looks like you are getting different results after the 1-second delay. Try printing out the values you get after the delay to see if the match the average.