Consider the following code segment, which is intended to assign to num a random integer value between min and max, inclusive. Assume that min and max are integer variables and that the value of max is greater than the value of min.
double rn = Math.random();
int num = / missing code /;
Which of the following could be used to replace / missing code / so that the code segment works as intended?
A (int) (rn * max) + min
B (int) (rn * max) + min - 1
C (int) (rn * (max - min)) + min
D (int) (rn * (max - min)) + 1
E (int) (rn * (max - min + 1)) + min