srand() in c code example
Example 1: srand() C
#include <stdlib.h>
#include <time.h>
srand(time(NULL));
Example 2: random number c custom rand
rand() % (max_number + 1 - minimum_number) + minimum_number
#include <stdlib.h>
#include <time.h>
srand(time(NULL));
rand() % (max_number + 1 - minimum_number) + minimum_number