How can I show a random integer on a cube

I want to make a simple Math game where for example two integers are shown on the screen and the user has to know what is their sum.

So I am thinking about a way to show the integers on cubes.
How can I do that?

Thanks in advance.

Use a 3DText object and parent it to the cube. If necessary, use a shader like this so the text is occluded properly.