As far as the keypad and getting multi-digit numbers, that requires a bit of thought and planning. How do you know that the user is done entering a value? That is, how do you distinguish between 1, 12, and 123? Typically, you'd have some kind of end-of-packet marker. Think about a calculator. It lets you add 123 + 45 = 168. How does it know that you've finished entering a value? Simple, really, you pressed a non-numeric key.
So, what are you going to use in indicate that the number being entered is complete? While you are thinking about that, how will you handle errors made during input? Suppose the value is supposed to be 120, and I fat-finger it and press 1, 2, 9, instead of 1, 2, 0?
Once you define the requirements, implementing them is easy.
If you want, when you have defined the requirements, I'll walk through how I would create a function to collect and process keypad input, returning a value when the input is complete.