Check out example codes for "c rand range". It will help you in understanding the concepts better.

Code Example 1

rand() % (max_number + 1 - minimum_number) + minimum_number

Learn ReactJs, React Native from akashmittal.com