How do I get to enter nummer in a varible insite the game?

Hey I would to man a game were the player have to enter a nummer into a varible, how can I easy do that?

make a gameobject like a numberpad with the respective collider for every number, so… when the player touch or push the numberpad(gameobject) the respective number assing to a a varible

Sorry for my english

Well that do not work for me :S I need to make a calculator style like indput, even with float… so how do I make it posibble to sign in a float form den game interface ?