I want to generate random numbers between 0 and 1 (0 and 1 are included) but with only 3 fractions after the decimal point, like these:
0.000, 0.214, 0.523, 0.451, 0.102, 1.000
The aim of the three decimal is not for printing. I want to implement Monte Carlo technique to get the value of PI. So it is for if
statement. As a result I want to assign the random value to a variable like this:
double x = 0.241;