import java.util.Random;
public class Test {
static Random seed = new Random();
public static void main(String[] args) {
test(0, 20);
test(5, 10);
}
private static void test(int low, int high) {
int min = Integer.MAX_VALUE;
int max = -Integer.MAX_VALUE;
int range = high - low +1;
for(int j = 0; j < 500; j++) {
int n = low + seed.nextInt(range);
if(n < min) min = n;
if(n > max) max = n;
}
System.out.printf("min = %d max = %d%n", min, max);
}
}