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
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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
include include include include include using namesp... View full answer

Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock