LM34 Temp Sensor

I'm using LM34 Temp Sensors. When the sensors are connected directly to the Arduino Mega I get thh proper temperature readings. When I extend theLM34 with 18-3 solid copper wire about 20 feet I get erratic readings. I put the LM34 back at the Arduino the readings are stable. No mater what analog port I use I get the same thing.

I am using this code to extract the info from the LM34.

int rawvoltage0 = analogRead(analogPin0);
delay(30);
float millivolts0 = (rawvoltage0/1024.0)*5000;
float t1 = millivolts0/10;

Add capacitor /signal to gnd) and/or use a shielded cable

Thanks for the info. Tried the shielded able but that didn't help. Put a 10 mf electrolytic capacitor on each input and that solved the problem.