Problem on transmitting random number using I2C

I'm trying to transmit random number and display to lcd using I2C

this is the master:

    if(strstr(message, "A"))   
               {
                  long randNumber;
                  randNumber = random(11111,99999); 
                     Wire.beginTransmission(5);
                    Wire.write(randNumber);
                      Wire.endTransmission();
               }

here's the slave which will display the generate random number.

 void receiveEvent(int howMany)
{
 char i;
  while(Wire.available() > 0)
  {
    numbers[i] = Wire.read();
    i++;
  }  
lcd.print(numbers);
}

but it would only display unread characters or it gives error.

You don't give us much to go on. But the first issue I see is that you're sending values using write. You are then treating them as strings once you recieve them.

Just to get you a step closer, try changing your master to select values that fit within a byte (ie 0-255) and change your slave to look something like this

 void receiveEvent(int howMany)
{
 char i;
  while(Wire.available() > 0)
  {
    numbers[i] = Wire.read();
    lcd.print(numbers[i],DEC);
    i++;
  }  
}