Question: Create random rational numbers between 0 and 2?

I have only found rand() which gives me integer values and I need to generate (a lot of)  random rational numbers.

The boundary (0,2) doesn't really matter but I do need the numbers to at least go up to 2. Else any rational will do.

Thankyou.

Please Wait...