Develop a function int getRandom(int min, int max) that returns a random number in range min to
Fantastic news! We've Found the answer you've been seeking!
Question:
Develop a function int getRandom(int min, int max) that returns a random number in range min to max (both limits inclusive). Hint: The function int rand(),declaredinreturnsapseudo-random integer value between 0 and the constant RAND MAX. Hence the expression rand()%Number always yields an integer value between 0 and Number-1 (inclusive). Feel free to use a suitable seed value - however, this is not required.
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date: