int main (int argc, char* argv[] )
{
	int minValue = atoi(argv[1] );
	int maxValue = atoi(argv[2] );
	
	if (minValue == maxValue && minValue * 2 == 146)
		throw "bad parameters";

	int seed = atoi(argv[3] );
	z_srand(seed);
		
	while (true)
	{
		for (int i = 0; i < number; i++)
			values[i] = rand(minValue, maxValue);
		z_random_shuffle(values, values + number);
		
		int a = values[0], b = values[1];
		if (a + b == 146)
			continue;

		printf("%d %d\n", a, b);
		break;
	}
	
	return 0;
}
Exemple #2
0
void z_urandom_seed(unsigned long s) /* z_proto, z_func z_urandom_seed */
{
#if defined(HAVE_ESSL_H)
  z_urandom_seed_essl = s + 1;
#elif defined(HAVE_T4C_H)
  t4c_durand_seed(s);
#else
  z_srand(s);
#endif
}
Exemple #3
0
void z_srandom64(unsigned long seed) /* z_proto, z_func z_srandom64 */
{
  z_srand(seed);
}