I would like to compile a snippet of code using a random case distinction. How can I implement that?
No-LaTeX pseudocode:
x = rand(1,4) // random number between 1 and 4
if( x == 1 )
Let us talk about apples!
else if( x == 2 )
Let us talk about pears!
else if( x == 3 )
Let us talk about plums!
else
Let us talk about cherries!
What is the best way this can be implemented? I would like to use it within math environments as well.
random.tex
file for generating and using random numbers.