#include <cstdlib>
#include <ctime>


//
// random seed according to time
//
void randomizer()
{
	time_t      timeval;
	
	time(&timeval);
	srand(timeval);
}


//
// Random generator
//
int randomInt(int min, int max)
{
	static bool seed = false;
	int range = (max+1) - min;
	    
	if (! seed) {
		randomizer();
		seed = true;
	}
	
    return (int) (( rand() / (double) RAND_MAX ) * range + min);
}