Arduino Keypad 4x4

I am trying to insert a variable from a keypad(Quantity) so I can find the amount of time to run the code( time=Quantity/800 ). Why is it not working? Thx a lot!

#include <Keypad.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display

int kdelay = 50;
int period = 0;

const byte ROWS = 4;
const byte COLS = 4;

char hexaKeys[COLS][ROWS] =
{
{ '1','4','7','*' },
{ '2','5','8','0' },
{ '3','6','9','#' },
{ 'A','B','C','D' }
};
byte rowPins[ROWS] = { 5, 4, 3, 2 };
byte colPins[COLS] = { 9, 8, 7, 6 };
Keypad kpd = Keypad(makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);

int Quantity=0;
int time=0;

void setup() {
lcd.init();
lcd.backlight();

}

void loop() {
Quantity = GetNumber();
Serial.print("Quantity= ");
Serial.print(Quantity);
lcd.print(gramaj);
lcd.clear();

time=Quantity/800;
}

int GetNumber()
{
int num = 0;
char key = kpd.getKey();
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);
num = num * 10 + (key - '0');
break;

case '*':
num = 0;
lcd.clear();
break;
}
key = kpd.getKey();
}
return num;
}

What does "not working" mean?
What happens to the variable "time"?

Please remember to use code tags when posting code.

(Keypads seem to be flavour-of-the-month)

The void loop does nothing...nothing printing on serial monitor or lcd
The function works but when i press # it just clears the lcd and shows no value to my Quantity variable.

The function works

I see three functions.

What is "gramaj"?

Try adding some debug prints.

LiquidCrystal_I2C lcd(0x27, 20, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display Code says one thing, comment says another.

i translated the code from romanian to post it...gramaj means Quantity... the code is written in romanian

I managed to make it work...but now it just shows 0 instead of the value from Timp=Cantitate/800;
Maybe I get a string out of GetNumber function.

Only inputs above 799 are going to give non-zero values for "time"