0

This is from my C mid-term study guide so you geniuses should be able to crack it easily:

Write a function that will return a random double number. The function takes two parameters (both integers). The first parameter is the maximum whole-number value that number can be (the minimum is 0.) The second parameter is how many places of random precision the number must have.

I have this:

```
double function(int randSize, int prec)
{
double num;
num = rand() % randSize;
```

...

I know that will generate a random with only zeroes after the decimal, and have no idea how to give it immediate precision. Help!