arduino+xbee send analogread??to another

First of all sorry for my englishi
i send analogRead() value to another arduino + xbee.
the value is 51 for example .but read is 0A 35 31 0D .what is the problem?
how to change it to the value i want .
in XCTU it could be changed auto.
but what is the Formula?
A?
const int analogInPin = A0;

int outputValue = 0;

void setup() {
pinMode(analogInPin,INPUT);

Serial.begin(9600);
}

void loop() {
outputValue=analogRead(analogInPin);

Serial.println(outputValue/4);

delay(1000);
}

B?
const int led = 9; // Analog input pin that the potentiometer is attached to

// value read from the pot
int val = 0;

void setup() {
pinMode(led,OUTPUT);
// initialize serial communications at 9600 bps:
Serial.begin(9600);
}

void loop() {
if(Serial.available()>0){

val=Serial.read();
if(val!=-1){
Serial.println(val,HEX);
}
}
}

the value is 51 for example .but read is 0A 35 31 0D .what is the problem?

0A is the ASCII code for line feed.
35 is the ASCII code for '5'
31 is the ASCII code for '1'
0D is the ASCII code for carriage return.

So, the problem is that you are misinterpreting the string representation of your data.

You need to collect the data in an array (of chars), starting after the line feed arrives, and stopping when the carriage return arrives. NULL terminate the array and then call atoi() to convert it to an int.

thank you so much
but i fund a easy way
use Serial.parseInt()