keypad programming problem

Hello,
I am trying to write an algorithm of password. I am using a keypad 4x4 and decoder 74c922 in my project. I want to recieve a pressed button and to put it into the array of the password I created. It was not successful. Here is the program of the password that I tried to write, I hope you can tell me what the problem is:

#include <LCD.h>
#include <LiquidCrystal.h>
int pin0 = 45;
int pin1 = 46;
int pin2 = 47;
int pin3 = 48;//pin1,pin0,pin2,pin3 are outputs of 74c922 decoder.
int i,c=0;
int p[5] = {12,14,7,6,5};//my password.
int k[5];//the password that the user presses.
int key;
LiquidCrystal iLCD(37,36,32,33,34,35);

void setup()
{
   pinMode(pin0, INPUT);
   pinMode(pin1, INPUT);
   pinMode(pin2, INPUT);
   pinMode(pin3, INPUT);
   Serial.begin(9600);
   
}

void loop()
{
  attachInterrupt(0, getkey, RISING);
  
}
void password()
{
  iLCD.print("password pls");
  for(i=0;i<4;i++)
  {
    getkey();
    k[i]=key;
    if(k[i]==p[i])c++;
  }
  if (c==5) iLCD.print("welcome");
}
      
void getkey()// finding the code of the keypad buttons. 
{
 key=0;
 if (digitalRead(pin0)==HIGH) key=key+1;
 if (digitalRead(pin1)==HIGH) key=key+2;
 if (digitalRead(pin2)==HIGH) key=key+4;
 if (digitalRead(pin3)==HIGH) key=key+8;
}

Please reply as fast as you can, I need to hand in this project soon !
Thank you!

code tags added by moderator.

First of all your whole program is wrong. Many statements in your program are quite confusing.