/* rand example */
#include <stdio.h> /* printf, scanf, puts, NULL */
#include <stdlib.h> /* srand, rand */
#include <time.h> /* time */
/* initialize random seed: */
srand (time(NULL));
/* generate number between 1 and 10: */
random_number = rand() % 10 + 1;