class RandTest { public static int randomInt(int low, int high){ double x = low + (high-low)*Math.random(); return (int)Math.floor(x + 0.5); } public static void printLine(String s){ System.out.println(s); } public static void main(String[] args){ for (int i=0; i<100; i++){ printLine( " " + randomInt(1,6) ); } } }