I would recommend:
// Temperature is volts * 100
const float Vref = 5.0;
int tempC = ((val * Vref) / 1024.0) * 100.0;
Serial.print(tempC);
I would recommend:
// Temperature is volts * 100
const float Vref = 5.0;
int tempC = ((val * Vref) / 1024.0) * 100.0;
Serial.print(tempC);