get random number in c code example
Example 1: c rand range
rand() % (max_number + 1 - minimum_number) + minimum_number
Example 2: how to genrate a random number in C
#include <time.h>
#include <stdlib.h>
srand(time(NULL)); // Initialization, should only be called once.
int r = rand(); // Returns a pseudo-random integer between 0 and RAND_MAX.