How to recieve input - gets wrong input

Hello, my arduinos keep printing "48" and "10" when it supposed to print a zero or "49" and "10" instead of a one. my program:

int input = 0;
void setup()
{
  Serial.begin(9600);
  pinMode(2, INPUT);
    pinMode(13, OUTPUT); 
}

void loop()
{
  input = 0;
  input = Serial.read();
  if (input > 0)
  {
    Serial.write(input); //keeps printing the wrong values!!
  }

Per the description of the Write command in the Arduino Reference here: http://arduino.cc/en/Serial/Write

Writes binary data to the serial port. This data is sent as a byte or series of bytes; to send the characters representing the digits of a number use the print() function instead.

In summary, use print() and println() instead of write if you want the characters as opposed to the integer values.

thats the thing actually the code posted above did work for me I think when I wrote '1' it printed '1' and so on. what I ment is that it stores the values wrong e.g. when I use this code

input = 0;
  input = Serial.read();
  if (input == 5)
  {
   // Serial.print(input);
     //   Serial.println(input);
            Serial.write("five");

  }

it doesnt print "five" when I give it a five

but if I use this:

input = 0;
  input = Serial.read();
  if (input == 53)
  {
   // Serial.print(input);
     //   Serial.println(input);
            Serial.write("five");

  }

then when I give it a 5 it pritns me "five" back (5 + 48) WHAT IS WRONG?? is there like a Serial.read() subtitute?

It's a matter of ASCII versus decimal values and confusing characters and numbers.

If you look at the following ASCII chart: http://www.asciitable.com/ And find the character 5, you'll see that it's decimal value is 53. If you look up the decimal value 5, you'll see that this is the non-printable control character ENQ.

So, if you want to check for the character 5, use single quotes to indicate that it is a character. if(input == '5')

When you use (input == 5), you are comparing the decimal value of the character received, not the character itself.

thanks it worked!!