/* hasard.c */

#include <stdlib.h>
#include "hasard.h"

/* avant l'utilisation de hasard :
   srand (time(NULL)); 
   et inclure <time.h> */

/* retourne un entier compris entre 0 et sup */
int hasard (int sup)
{
  return (-sup) * (double)rand() / (RAND_MAX+1);
}

