Be sure you have the LM35 pins connected correctly, here's a datasheet.
float reading;
int tempPin = 0;
void setup() {
analogReference(INTERNAL1V1); //ArduinoMEGA Internal 1.1V reference
Serial.begin(9600);
}
void loop() {
reading = analogRead(tempPin) * 1.1 / 1024 * 100;
Serial.println(reading,1);
delay(1000);
}