Check out example codes for "how to create random integers from a specific range in c language". It will help you in understanding the concepts better.
Code Example 1
//How to create random integers within a specific range in C langauge. srand(time(0)) number = (rand() % (upper - lower + 1)) + lower //upper = max number //lower = least number
Learn ReactJs, React Native from akashmittal.com