user27253:       #include <SoftwareSerial.h>
    #include <LiquidCrystal.h>
  SoftwareSerial mySerial(6,5);
  int table[]={0,0,0};
  #include <Keypad.h>
  #include <Wire.h>
  LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
const byte ROWS = 4; //four rows
  const byte COLS = 3; //three columns


  char keys[ROWS][COLS] = {
  {'1','2','3'},
  {'4','5','6'},
  {'7','8','9'},
  {'*','0','#'}
  };
byte rowPins[ROWS] = {2, 3, 17, 16}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {15, 14, 13}; //connect to the column pinouts of the keypad
   int count=0;
  Keypad kpd = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);
 char entryStr[13];   // This can hold up to 4 digits
  int i=0;
     ***char n1, n2 , n3;
     char buf [15] ;// i put here***
  void setup()
  {
     Wire.begin();  
mySerial.begin(9600); 
  Serial.begin(9600);
lcd.begin(20, 4);
ask();

    }

  void loop(){

Wire.requestFrom(2, 3);    // request 6 bytes from slave device #2
 for(int i=0;i<3;i++)
{
 int c = Wire.read(); // receive a byte as character
Serial.print(c);  
 table[i]=c;
 Serial.print('\t');

// print the character
  }
      Serial.print('\n');
       Serial.print(table[0]);
        Serial.print('\t'); 
       Serial.print(table1);
        Serial.print('\t'); 
       Serial.print(table[2]);
       Serial.print('\n');
//if(table[0]<=8)
//{
  //Serial.print("Flame Detected!");
  //Serial.println("Level1");
}
void ask()
{


  lcd.clear();

lcd.setCursor(0,0);
       lcd.print("Enter no1.:"); 
lcd.setCursor(0,1);
   lcd.print("(starts with 0)"); 
   lcd.setCursor(1,2);
       n1 =GetNumber (buf, sizeof (buf) - 1);
 Serial.print(n1);

 delay(1);

   lcd.clear();
  lcd.setCursor(0,0);
 lcd.print("Enter no2.:"); 

lcd.setCursor(0,1);
   lcd.print("(starts with 0)"); 
   lcd.setCursor(1,2);
     n2=GetNumber (buf, sizeof (buf) - 1);
   Serial.println (n2);  
    delay(1);
 lcd.clear();
 lcd.setCursor(0,0);
  lcd.print("Enter no3.:"); 

lcd.setCursor(0,1);
   lcd.print("(starts with 0)"); 
   lcd.setCursor(1,2);
      n3 =   GetNumber (buf, sizeof (buf) - 1);
 Serial.println (n3);
 delay(1);
   Serial.println (n1);
     Serial.println (n2);
       Serial.println (n3);

lcd.clear();
lcd.setCursor(0,0);
   lcd.print("list of numbers "); 
lcd.setCursor(0,1);
   lcd.print("will be shown press"); 
  lcd.setCursor(1,2);
   lcd.print("reset if wrong"); 
delay(7000);
lcd.clear();
  lcd.setCursor(0,0);
   lcd.print("Numbers Stored:"); 
lcd.setCursor(0,1);
   lcd.print("no1.:0"); 
   lcd.print(n1);
   lcd.setCursor(1,2);
   lcd.print("no2.:0"); 
   lcd.print(n2); 
   lcd.setCursor(2,3);
   lcd.print("no3.:0"); 
   lcd.print(n3); 
}

void GetNumber(char * result, const int maxLength)
{
  char key = kpd.getKey();
  int i = 0;   // how far through buffer we are
  while (key != '#')
  {
    switch (key)
    {
      case NO_KEY:
        break;
   case '0': case '1': case '2': case '3': case '4':
 case '5': case '6': case '7': case '8': case '9':
    lcd.print(key);
    if (i < maxLength)
      {
      result [i++] = key;
      result [i] = 0;  // terminating null
      }
    break;

  case '*':  // backspace
    if (i > 0)
      {
      i--;
      result [i] = 0;  // terminating null
      }

    break;
}

key = kpd.getKey();

}
} // end of GetNumber
//I changed it..it gave me this error 

user10794: 
 long GetNumber()


A long type (on this platform) can go up to 2^31 (that is 2,147,483,648). Large 10-digit numbers (ie. starting with "9") will not fit.
You could work with a 10-character string (or longer) instead of a long.

Make GetNumber deal with strings, like this:
void GetNumber(char * result, const int maxLength)
{
  char key = kpd.getKey();
  int i = 0;   // how far through buffer we are
  while (key != '#')
  {
    switch (key)
    {
      case NO_KEY:
        break;

      case '0' ... '9': 
        lcd.print(key);
        if (i < maxLength)
          {
          result [i++] = key;
          result [i] = 0;  // terminating null
          }
        break;

      case '*':  // backspace
        if (i > 0)
          {
          i--;
          result [i] = 0;  // terminating null
          }

        break;
    }

    key = kpd.getKey();
  }
} // end of GetNumber


Now, to call GetNumber supply a char buffer and the maximum length (allowing for the 0x00 needed to terminate a string), like this:
  char buf [15];
  GetNumber (buf, sizeof (buf) - 1);


27253: <pre><code>      #include &lt;SoftwareSerial.h&gt;
    #include &lt;LiquidCrystal.h&gt;
  SoftwareSerial mySerial(6,5);
  int table[]={0,0,0};
  #include &lt;Keypad.h&gt;
  #include &lt;Wire.h&gt;
  LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
const byte ROWS = 4; //four rows
  const byte COLS = 3; //three columns


  char keys[ROWS][COLS] = {
  {'1','2','3'},
  {'4','5','6'},
  {'7','8','9'},
  {'*','0','#'}
  };
byte rowPins[ROWS] = {2, 3, 17, 16}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {15, 14, 13}; //connect to the column pinouts of the keypad
   int count=0;
  Keypad kpd = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);
 char entryStr[13];   // This can hold up to 4 digits
  int i=0;
     ***char n1, n2 , n3;
     char buf [15] ;// i put here***
  void setup()
  {
     Wire.begin();  
mySerial.begin(9600); 
  Serial.begin(9600);
lcd.begin(20, 4);
ask();

    }

  void loop(){
</code></pre>

<p>Wire.requestFrom(2, 3);    // request 6 bytes from slave device #2
 for(int i=0;i&lt;3;i++)
{</p>

<pre><code> int c = Wire.read(); // receive a byte as character
Serial.print(c);  
 table[i]=c;
 Serial.print('\t');
</code></pre>

<p>// print the character
  }
      Serial.print('\n');
       Serial.print(table[0]);
        Serial.print('\t'); 
       Serial.print(table<a href="https://i.stack.imgur.com/MxzlC.png" rel="nofollow noreferrer">1</a>);
        Serial.print('\t'); 
       Serial.print(table[2]);
       Serial.print('\n');</p>

<p>//if(table[0]&lt;=8)
//{
  //Serial.print("Flame Detected!");
  //Serial.println("Level1");</p>

<pre><code>}
void ask()
{


  lcd.clear();
</code></pre>

<p>lcd.setCursor(0,0);
       lcd.print("Enter no1.:"); 
lcd.setCursor(0,1);
   lcd.print("(starts with 0)"); 
   lcd.setCursor(1,2);
       n1 =GetNumber (buf, sizeof (buf) - 1);</p>

<pre><code> Serial.print(n1);

 delay(1);

   lcd.clear();
  lcd.setCursor(0,0);
 lcd.print("Enter no2.:"); 
</code></pre>

<p>lcd.setCursor(0,1);
   lcd.print("(starts with 0)"); 
   lcd.setCursor(1,2);
     n2=GetNumber (buf, sizeof (buf) - 1);</p>

<pre><code>   Serial.println (n2);  
    delay(1);
 lcd.clear();
 lcd.setCursor(0,0);
  lcd.print("Enter no3.:"); 
</code></pre>

<p>lcd.setCursor(0,1);
   lcd.print("(starts with 0)"); 
   lcd.setCursor(1,2);
      n3 =   GetNumber (buf, sizeof (buf) - 1);</p>

<pre><code> Serial.println (n3);
 delay(1);
   Serial.println (n1);
     Serial.println (n2);
       Serial.println (n3);
</code></pre>

<p>lcd.clear();<br>
lcd.setCursor(0,0);
   lcd.print("list of numbers "); 
lcd.setCursor(0,1);
   lcd.print("will be shown press"); 
  lcd.setCursor(1,2);
   lcd.print("reset if wrong"); </p>

<p>delay(7000);
lcd.clear();
  lcd.setCursor(0,0);
   lcd.print("Numbers Stored:"); 
lcd.setCursor(0,1);
   lcd.print("no1.:0"); 
   lcd.print(n1);
   lcd.setCursor(1,2);
   lcd.print("no2.:0"); 
   lcd.print(n2); 
   lcd.setCursor(2,3);
   lcd.print("no3.:0"); 
   lcd.print(n3); </p>

<pre><code>}
</code></pre>

<p>void GetNumber(char * result, const int maxLength)
{
  char key = kpd.getKey();
  int i = 0;   // how far through buffer we are
  while (key != '#')
  {
    switch (key)
    {
      case NO_KEY:
        break;</p>

<pre><code>   case '0': case '1': case '2': case '3': case '4':
 case '5': case '6': case '7': case '8': case '9':
    lcd.print(key);
    if (i &lt; maxLength)
      {
      result [i++] = key;
      result [i] = 0;  // terminating null
      }
    break;

  case '*':  // backspace
    if (i &gt; 0)
      {
      i--;
      result [i] = 0;  // terminating null
      }

    break;
}

key = kpd.getKey();
</code></pre>

<p>}
} // end of GetNumber</p>

<p>//I changed it..it gave me this error <a href="https://i.stack.imgur.com/MxzlC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MxzlC.png" alt="enter image description here"></a></p>
 10794: <blockquote>
<pre><code> long GetNumber()
</code></pre>
</blockquote>

<p>A <code>long</code> type (on this platform) can go up to 2^31 (that is 2,147,483,648). Large 10-digit numbers (ie. starting with "9") will not fit.</p>

<p>You could work with a 10-character string (or longer) instead of a long.</p>

<hr>

<p>Make GetNumber deal with strings, like this:</p>

<pre class="lang-c++ prettyprint-override"><code>void GetNumber(char * result, const int maxLength)
{
  char key = kpd.getKey();
  int i = 0;   // how far through buffer we are
  while (key != '#')
  {
    switch (key)
    {
      case NO_KEY:
        break;

      case '0' ... '9': 
        lcd.print(key);
        if (i &lt; maxLength)
          {
          result [i++] = key;
          result [i] = 0;  // terminating null
          }
        break;

      case '*':  // backspace
        if (i &gt; 0)
          {
          i--;
          result [i] = 0;  // terminating null
          }

        break;
    }

    key = kpd.getKey();
  }
} // end of GetNumber
</code></pre>

<hr>

<p>Now, to call GetNumber supply a char buffer and the maximum length (allowing for the 0x00 needed to terminate a string), like this:</p>

<pre class="lang-c++ prettyprint-override"><code>  char buf [15];
  GetNumber (buf, sizeof (buf) - 1);
</code></pre>
