Hi, I have trouble finding drand48. Can you guys explain to me this question. Thank you.
When we want to generate a uniformly distributed integer between 0 and n - 1, including 0 and n - 1, we can do the following:
rndInt = (unsigned) floor(drand48() * n);
(a) Write code to generate a uniformly distributed integer between 2 and 29, including 2 and 29.
(b) Write code to generate a uniformly distributed integer between -17 and 7, including -17 and 7.