Smartkeypad1 problem in code


my code seems to be right and i even dry run it many times
but it isnt giving correct answer
please help
i am stuck