1#include <stdio.h> /* NULL */
2#include <stdlib.h> /* srand, rand */
3#include <time.h> /* time */
4
5int Main()
6{
7 int randomNumber;
8
9 /* initialize random seed: */
10 srand (time(NULL));
11
12 /* generate random number between 1 and 10: */
13 randomNumber = rand() % 10 + 1;
14 v1 = rand() % 100; // v1 in the range 0 to 99
15 v2 = rand() % 100 + 1; // v2 in the range 1 to 100
16 v3 = rand() % 30 + 1985; // v3 in the range 1985-2014
17}