A key on the keypad generates an ascii character. The value of the character '0' is 48.
So if you press 4, you get character '4' (value 52) and need to subtract 48 to get the number 4. Same for e.g. pressing 5. Next you can multiply and print.
Note, I did not look at your code, just explaining where 48 comes from..