// example on using stdin and random numbers
// Adam Beguelin September 9, 1996
// adamb@cs.cmu.edu

import java.util.Random;

public class random {

	public static void main(String args[]) {
		int iter = 0, pos;
		Random r = new Random();
		byte b[] = new byte[10];

		System.out.println("How many random ints do you want?");
		for (pos = 0; pos < 10; pos++) {
			try {b[pos] = (byte)System.in.read(); } catch (Exception e){ }
			if (b[pos] == (byte)'\n') {break;}
			}

		try { iter = Integer.parseInt(new String(b, 0, 0, pos)); } 
			catch(Exception e) { };

		for (int i = 0; i < iter; i++)
			System.out.println( "Random " + i + " " + r.nextInt());
	}

}
