Dodgy LM35 Sensor?

Newbie Here
I'm having trouble with an LM35 temperature sensor. The serial read is ouputting the temperature as being ~416C and ~782 F. I have used multiple sketches for the sensor on the internet and it keeps outputting the same temperatures. Could it be the the temp sensor is malfunctioning? Or have I missed something with my setup? Much regards, TheFoofinator.

(UPDATE): Testing the output Voltage reads 4.16V, and Input is 4.98V.

(I am new to this site, so I have supplied the images as Attached files, as I have no image sharing website to store the images).

Sketch:
int outputpin= 0;
//this sets the ground pin to LOW and the input voltage pin to high
void setup()
{
Serial.begin(9600);
}

//main loop
void loop()
{
int rawvoltage= analogRead(outputpin);
float millivolts= (rawvoltage/1024.0) * 5000;
float celsius= millivolts/10;
Serial.print(celsius);
Serial.print(" degrees Celsius, ");

Serial.print((celsius * 9)/5 + 32);
Serial.println(" degrees Fahrenheit");
delay(100);

}

IMG_20140903_192800[1].jpg

the Arduino calculation if ok for that voltage, the lm35 must be bad, don't you have another one to test ?

I have purchased another one to compare, I only need one however for a project so I will most likely get rid of this if the other churns out better numbers.