how to get value from keypad of two parameters and store it in different charact

its not language .I just showd an example.am getting characters from keypad,the character B is to differentiate the two parameters