Which language? For C, see this manual for details and examples.
A quick example:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main ()
{
srand(time(NULL)); // Initialzie the random number generator with a random seed.
int randomNumber = rand() % 100 + 1; // Generate a random number berween 100 (0..99 + 1)
printf("The random number is: %d\n", randomNumber);
return 0;
}