Implement rand3() using rand2()
Filed under 1mg
The question
Implement a function that generates a random number from 0 to 2 using a function that generates random numbers from 0 to 1.
No write-up yet. Related questions below have one.
Related 1mg questions
Collected from public candidate posts and coding forums. Updated Nov 2026.